From kde-core-devel Thu Apr 26 12:05:03 2007 From: Olivier Goffart Date: Thu, 26 Apr 2007 12:05:03 +0000 To: kde-core-devel Subject: Re: strange KStaticDeleter usage Message-Id: <200704261405.08789.ogoffart () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=117758908629658 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart3713923.GuU8Z71Jjn" --nextPart3713923.GuU8Z71Jjn Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le jeudi 26 avril 2007, David Faure a =E9crit=A0: > On Thursday 26 April 2007, Thiago Macieira wrote: > > David Faure wrote: > > >This is a hook for applications like kontact, which can reimplement the > > > behavior. kontact creates and instanciates a derived class, which sets > > > it as the singleton instead of the kdelibs one, and everything goes > > > through it instead of using the default implementation from kdelibs. > > > > That's a pure singleton behaviour, which is acceptable. It's not a glob= al > > static behaviour. > > And how do you implement a singleton (with a base and a derived class) > without a global static? Apart from using KStaticDeleter? :-) > We need something that deletes singletons at the end of the process, to > make memory leak debugging simpler, and that's what KStaticDeleter was > doing up to now. maybe using the same design pattern as KMessage / KMessageHandler --nextPart3713923.GuU8Z71Jjn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGMJVwz58lY8jWrL0RAgUSAJwLejlJ5pyEEau4DPqxPmHd4cPWMgCfW3uM 3FrOfxI10zHeOxpi2pygZrQ= =7QJ2 -----END PGP SIGNATURE----- --nextPart3713923.GuU8Z71Jjn--