activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r487973 - /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp
Date Sun, 17 Dec 2006 12:03:16 GMT
Author: nmittler
Date: Sun Dec 17 04:03:15 2006
New Revision: 487973

URL: http://svn.apache.org/viewvc?view=rev&rev=487973
Log:
[AMQCPP-27] Update to fix mem leak in Thread on *nix

Modified:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp?view=diff&rev=487973&r1=487972&r2=487973
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp
Sun Dec 17 04:03:15 2006
@@ -31,17 +31,6 @@
 using namespace activemq;
 using namespace activemq::concurrent;
 
-#ifdef unix
-static struct ThreadStaticInitializer {
-    // Thread Attribute member
-    pthread_attr_t threadAttribute;
-    // Static Initializer:
-    ThreadStaticInitializer() {
-        ::pthread_attr_init (&threadAttribute);
-        ::pthread_attr_setdetachstate (&threadAttribute, PTHREAD_CREATE_JOINABLE);
-    }
-} threadStaticInitializer;
-#endif
 
 ////////////////////////////////////////////////////////////////////////////////
 Thread::Thread()
@@ -169,7 +158,7 @@
     }
 
 #ifdef unix
-    ::pthread_exit( NULL );
+    ::pthread_attr_destroy( &thread->attributes );
     return NULL;
 #else
 



Mime
View raw message