Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-01-10 23:28:41


Philippe Mori wrote:

> In some situations, we want to "shutdown" an application while
> there are still references to the singleton (for exemple static
> variables)
> and we want objects to be destroyed sooner that what will happen by
> default.

In this case it would seem to me that a ShutDown method should be added
to the derived singleton, and called appropriately. Adding a policy to
handle this seems unnecessary and redundant, because at most it could
only enforce that the singleton have the ShutDown method. Only the
derived singleton knows exactly what ShutDown entails, and only classes
that refer to that specific type of singleton could possibly know when
it would be appropriate to make that function call.

-Jason


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk