Can Q_GLOBAL_STATIC replace KStaticDelete ?
thiago at kde.org
Fri Jan 19 12:19:55 GMT 2007
Matthias Kretz wrote:
>On Friday 19 January 2007 07:48, Thiago Macieira wrote:
>> The code looks good.
>> Simple, effective, easy to read.
>thanks. How about the attached version? Now it will abort with a helpful
> error message if you access the global static after destruction (this
> would have spared me one day of debugging if Q_GLOBAL_STATIC had
> aborted instead of returning 0).
>e.g.: accessed global static 'A *getA()' after destruction
Good idea. Suggestion: add __FILE__ to the fatal message. These are static
variables, so they may have ambiguous names, but the file name should
>Where should we put it in kdelibs? kglobal.h or should it get its own
I guess kglobal.h is good enough.
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
Size: 189 bytes
Desc: not available
More information about the kde-core-devel