summaryrefslogtreecommitdiff
path: root/ace/Log_Msg.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-27 03:08:11 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-27 03:08:11 +0000
commit31cd8808cb8e200c0efb9bde1bb04649e7f07d55 (patch)
treedba5b89261211c44156f5273f6e814a71d045a2d /ace/Log_Msg.cpp
parent9a75a586957dcfa763c7ea2e9bac322ee6e33b64 (diff)
downloadATCD-31cd8808cb8e200c0efb9bde1bb04649e7f07d55.tar.gz
(ACE_Log_Msg_Manager::close): delete the main thread's Log_Msg
Diffstat (limited to 'ace/Log_Msg.cpp')
-rw-r--r--ace/Log_Msg.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index c34fe013d3a..d456063cb73 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -131,6 +131,15 @@ ACE_Log_Msg_Manager::close (WIND_TCB *tcb)
void
ACE_Log_Msg_Manager::close (void)
{
+ // Delete the main thread's Log_Msg.
+ ACE_Log_Msg *tss_log_msg = 0;
+ if (ACE_OS::thr_getspecific (key_,
+ (void **) &tss_log_msg) != -1)
+ {
+ delete tss_log_msg;
+ tss_log_msg = 0;
+ }
+
ACE_OS::thr_keyfree (key_);
// Ugly, ugly, but don't know a better way.
@@ -272,6 +281,7 @@ ACE_Log_Msg::instance (void)
// Store the dynamically allocated pointer in thread-specific
// storage. It gets deleted via the ACE_TSS_cleanup function
// when the thread terminates.
+
if (ACE_OS::thr_setspecific (key_, (void *) tss_log_msg) != 0)
return 0; // Major problems, this should *never* happen!
}