RFC: singletons and memory management
Soren Harward
stharward at gmail.com
Thu Sep 11 00:00:22 CEST 2008
On Wednesday 10 September 2008 17:38:06 Ian Monroe wrote:
> if (The::playlistModel() )
> The::playlistModel()->something()
But if The::playlistModel() is just an alias for PlaylistModel::instance()
(which it is in every single case that I've looked at so far), then you don't
have to check if The::playlistModel() exists, because as soon as you call it,
it does. That's the whole point of a singleton.
--
Soren Harward
More information about the Amarok-devel
mailing list