kiconloader's other api change
Thiago Macieira
thiago at kde.org
Mon Jan 8 17:27:51 GMT 2007
David Faure wrote:
>I like how it makes the code shorter though. I just hope it works fine
> in all the cases that kstaticdeleter was tested with (library
> unloading; detecting calls after deletion - kstaticdeleter resets the
> global pointer to 0 in its destructor). Time will tell.
QGlobalStatic (the hidden class behind Q_GLOBAL_STATIC) deletes the object
when the library unloads and sets the pointer to 0. Of course, since it's
static, it's rather pointless, because the library is being deleted --
it's just for the cases where the function gets accessed after deletion.
In those cases, the caller must be able to detect a 0 pointer. I am sure
99% of the code don't do that. In KStaticDeleter too.
Note that not all systems will call destructors in the event of library
unloading -- especially if they were loaded due to a plugin load.
--
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/20070108/458dd925/attachment.sig>
More information about the kde-core-devel
mailing list