RFC: singletons and memory management

Jeff Mitchell kde-dev at emailgoeshere.com
Thu Sep 11 13:50:18 CEST 2008


Leo Franchi wrote:
> I was responding to eean's point, not yours :)

I think you mean my point :-)

Anyways, I had understood part of the problem to be that singletons
remaining open as the program closes ends up causing crashes due to
accessing other deleted objects, etc. (otherwise, there isn't any reason
to clean up/delete these singletons, other than pedantry).

So, if this is the case, then if a singleton is deleted, then called
again via instance and re-created, then we're in the same situation as
before where the singleton is likely to remain open as the program
closes, causing a crash on exit when it's finally destroyed.

--Jeff


More information about the Amarok-devel mailing list