activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r709878 - /activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp
Date Sun, 02 Nov 2008 13:13:34 GMT
Author: tabish
Date: Sun Nov  2 05:13:34 2008
New Revision: 709878

URL: http://svn.apache.org/viewvc?rev=709878&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-200

Fix possible memory leak

Modified:
    activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp?rev=709878&r1=709877&r2=709878&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp Sun Nov  2 05:13:34 2008
@@ -170,6 +170,11 @@
         return;
     }
 
+    if( this->cause != NULL ) {
+        std::cout << "Deleting old Cause" << std::endl;
+        delete this->cause;
+    }
+
     const Exception* ptrCause = dynamic_cast<const Exception*>( cause );
     if( ptrCause == NULL ) {
         this->cause = new Exception( __FILE__, __LINE__, cause->what() );



Mime
View raw message