[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Misuse of K_GLOBAL_STATIC?
From:       Thiago Macieira <thiago () kde ! org>
Date:       2008-05-14 11:28:48
Message-ID: 200805141328.48872.thiago () kde ! org
[Download RAW message or body]


On Wednesday 14 May 2008 13:21:47 Jarosław Staniek wrote:
> Hi, shouldn't we move K_GLOBAL_STATIC out of the bodies in such cases?
>
>
> KIMProxy * KIMProxy::instance()
> {
> 	K_GLOBAL_STATIC(KIMProxy, s_instance)
> 	return s_instance;
> }

Yes, they should be out of function bodies. The use above is not what 
K_GLOBAL_STATIC was intended to be. I recommend not doing it even though it 
works. Something might change in the future.

-- 
   Thiago Macieira   -   thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C   966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic