Public Methods | |
| ACE_OS_Object_Manager_Manager (void) | |
| Constructor. More... | |
| ~ACE_OS_Object_Manager_Manager (void) | |
| Destructor. More... | |
Private Attributes | |
| ACE_thread_t | saved_main_thread_id_ |
| Save the main thread ID, so that destruction can be suppressed. More... | |
Without ACE_HAS_NONSTATIC_OBJECT_MANAGER, a static instance of this class is created. Therefore, it gets created before main () is called. And it gets destroyed after main () returns.
Definition at line 6935 of file OS.cpp.
|
|
Constructor.
Definition at line 6949 of file OS.cpp. References ACE_OS_Object_Manager::instance.
06950 : saved_main_thread_id_ (ACE_OS::thr_self ()) 06951 { 06952 // Ensure that the Object_Manager gets initialized before any 06953 // application threads have been spawned. Because this will be called 06954 // during construction of static objects, that should always be the 06955 // case. 06956 (void) ACE_OS_Object_Manager::instance (); 06957 } |
|
|
Destructor.
Definition at line 6959 of file OS.cpp. References ACE_OS_Object_Manager::instance_, saved_main_thread_id_, ACE_OS::thr_equal, and ACE_OS::thr_self.
06960 {
06961 if (ACE_OS::thr_equal (ACE_OS::thr_self (),
06962 saved_main_thread_id_))
06963 {
06964 delete ACE_OS_Object_Manager::instance_;
06965 ACE_OS_Object_Manager::instance_ = 0;
06966 }
06967 // else if this destructor is not called by the main thread, then do
06968 // not delete the ACE_OS_Object_Manager. That causes problems, on
06969 // WIN32 at least.
06970 }
|
|
|
Save the main thread ID, so that destruction can be suppressed.
Definition at line 6946 of file OS.cpp. Referenced by ~ACE_OS_Object_Manager_Manager. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002