activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r519137 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireFormat.cpp
Date Fri, 16 Mar 2007 20:44:33 GMT
Author: tabish
Date: Fri Mar 16 13:44:31 2007
New Revision: 519137

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

Fix BooleanStream memory leak

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireFormat.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireFormat.cpp?view=diff&rev=519137&r1=519136&r2=519137
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireFormat.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireFormat.cpp
Fri Mar 16 13:44:31 2007
@@ -126,17 +126,17 @@
             }
 
             if( tightEncodingEnabled ) {
-                BooleanStream* bs = new BooleanStream();
-                size += dsm->tightMarshal1( this, dataStructure, bs );
-                size += bs->marshalledSize();
+                BooleanStream bs;
+                size += dsm->tightMarshal1( this, dataStructure, &bs );
+                size += bs.marshalledSize();
 
                 if( !sizePrefixDisabled ) {
                     dataOut->writeInt( size );
                 }
 
                 dataOut->writeByte( type );
-                bs->marshal( dataOut );
-                dsm->tightMarshal2( this, dataStructure, dataOut, bs );
+                bs.marshal( dataOut );
+                dsm->tightMarshal2( this, dataStructure, dataOut, &bs );
 
             } else {
                 DataOutputStream* looseOut = dataOut;



Mime
View raw message