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

List:       kde-core-devel
Subject:    Re: strange KStaticDeleter usage
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2007-04-26 12:05:03
Message-ID: 200704261405.08789.ogoffart () kde ! org
[Download RAW message or body]


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


["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