activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1421511 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
Date Thu, 13 Dec 2012 20:41:38 GMT
Author: tabish
Date: Thu Dec 13 20:41:37 2012
New Revision: 1421511

URL: http://svn.apache.org/viewvc?rev=1421511&view=rev
Log:
fix unlikely but possible memory leak

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp?rev=1421511&r1=1421510&r2=1421511&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
Thu Dec 13 20:41:37 2012
@@ -389,8 +389,9 @@ namespace {
 
         try {
             PlatformThread::createMutex(&thread->mutex);
+        } catch(RuntimeException& ex) {
+            throw ex;
         }
-        DECAF_CATCH_RETHROW( RuntimeException );
 
         try {
             PlatformThread::createCondition(&thread->condition);
@@ -871,7 +872,9 @@ ThreadHandle* Threading::createNewThread
         throw NullPointerException(__FILE__, __LINE__, "One or more arguments was NULL");
     }
 
-    Pointer<ThreadHandle> thread(initThreadHandle(new ThreadHandle()));
+    Pointer<ThreadHandle> thread(new ThreadHandle());
+
+    initThreadHandle(thread.get());
 
     thread->parent = parent;
     thread->name = ::strdup(name);



Mime
View raw message