[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Misuse of K_GLOBAL_STATIC?
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2008-05-14 11:40:03
Message-ID: 482ACF93.9000609 () iidea ! pl
[Download RAW message or body]
Thiago Macieira said the following, On 2008-05-14 13:28:
> 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.
If so, please read my other post in this thread: we have many private ctors...
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
KDE Libraries for MS Windows (http://windows.kde.org)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic