
11 Jan
2005
11 Jan
'05
4:28 a.m.
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