Can Q_GLOBAL_STATIC replace KStaticDelete ?

Thiago Macieira thiago at kde.org
Wed Jan 17 23:42:02 GMT 2007


Matthias Kretz wrote:
>Right, but that wouldn't clean up the static object if ~QCoreApplication
> isn't called. I need something that also gets cleaned up on lib unload.
>
>So the extra Q/KGlobalStatic class is necessary also in this case.
>
>Do we want a non-thread-safe solution for K_GLOBAL_STATIC then? Or can
> the trolls give us permission to use QAtomic-API? (I'm happy to use
> Q(Basic)AtomicPointer instead of q_atomic_test_and_set_ptr if that
> helps.)

I think that global statics that require Kinstance should be the absolute 
minority and code can be specially crafted for them.

I think we should NOT have K_GLOBAL_STATIC. Adding it will complicate 
because the semantics won't be clear.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070118/82b98437/attachment.sig>


More information about the kde-core-devel mailing list