You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by nm...@apache.org on 2006/12/17 13:03:16 UTC
svn commit: r487973 -
/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/Thread.cpp
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