Public Member Functions | |
ACE_OS_Object_Manager_Manager (void) | |
Constructor. | |
~ACE_OS_Object_Manager_Manager (void) | |
Destructor. | |
Private Attributes | |
ACE_thread_t | saved_main_thread_id_ |
Save the main thread ID, so that destruction can be suppressed. |
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 466 of file Object_Manager_Base.cpp.
|
Constructor.
Definition at line 480 of file Object_Manager_Base.cpp. References ACE_OS_Object_Manager::instance().
00481 : saved_main_thread_id_ (ACE_OS::thr_self ()) 00482 { 00483 // Ensure that the Object_Manager gets initialized before any 00484 // application threads have been spawned. Because this will be called 00485 // during construction of static objects, that should always be the 00486 // case. 00487 (void) ACE_OS_Object_Manager::instance (); 00488 } |
|
Destructor.
Definition at line 490 of file Object_Manager_Base.cpp. References ACE_OS::thr_equal().
00491 { 00492 if (ACE_OS::thr_equal (ACE_OS::thr_self (), 00493 saved_main_thread_id_)) 00494 { 00495 delete ACE_OS_Object_Manager::instance_; 00496 ACE_OS_Object_Manager::instance_ = 0; 00497 } 00498 // else if this destructor is not called by the main thread, then do 00499 // not delete the ACE_OS_Object_Manager. That causes problems, on 00500 // WIN32 at least. 00501 } |
|
Save the main thread ID, so that destruction can be suppressed.
Definition at line 477 of file Object_Manager_Base.cpp. |