summaryrefslogtreecommitdiff
path: root/ACE/ace/Singleton.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-01-30 12:55:25 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-01-30 12:55:25 +0000
commita7d92cc8483a7ac032edb2abdf6fabe4014be101 (patch)
tree09516e8d0055a83a90b49cc864ec9a2c0d927402 /ACE/ace/Singleton.h
parent5577f785670ffb6499ed8f35eb6d82c3c03d6b55 (diff)
downloadATCD-a7d92cc8483a7ac032edb2abdf6fabe4014be101.tar.gz
Fri Jan 30 11:54:52 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Intrusive_List.cpp: Just have one exit point in the methods * ace/Singleton.cpp: * ace/Singleton.h: Added a static close() which can be used to explicitly close an ACE_Singleton. It will then deregister from the object manager from cleanup. This way an application developer could close his singletons explicitly, but keep the safety that ACE will do that also when the application does a shutdown * tests/run_test.lst: * tests/tests.mpc: * tests/Singleton_Test.cpp: Added a new test for the close
Diffstat (limited to 'ACE/ace/Singleton.h')
-rw-r--r--ACE/ace/Singleton.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ACE/ace/Singleton.h b/ACE/ace/Singleton.h
index 33cfc3cdaca..28ce78cd017 100644
--- a/ACE/ace/Singleton.h
+++ b/ACE/ace/Singleton.h
@@ -86,6 +86,9 @@ public:
/// ACE_Singleton.
virtual void cleanup (void *param = 0);
+ /// Explicitly delete the Singleton instance.
+ static void close (void);
+
/// Dump the state of the object.
static void dump (void);