activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r709951 - /activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/CharArrayBufferTest.cpp
Date Sun, 02 Nov 2008 22:05:51 GMT
Author: tabish
Date: Sun Nov  2 14:05:51 2008
New Revision: 709951

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

Fix possible memory leaks and resolving Valgrind warnings.

Modified:
    activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/CharArrayBufferTest.cpp

Modified: activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/CharArrayBufferTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/CharArrayBufferTest.cpp?rev=709951&r1=709950&r2=709951&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/CharArrayBufferTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/CharArrayBufferTest.cpp Sun Nov
 2 14:05:51 2008
@@ -460,6 +460,13 @@
     char* array = new char[testBuffer1->capacity()];
     char* array2 = new char[testBuffer1->capacity() + 1];
 
+    for( std::size_t ix = 0; ix < testBuffer1->capacity(); ++ix ){
+        array[ix] = 0;
+    }
+    for( std::size_t ix = 0; ix < testBuffer1->capacity() + 1; ++ix ){
+        array2[ix] = 0;
+    }
+
     CharBuffer* readOnly = testBuffer1->asReadOnlyBuffer();
     readOnly->clear();
     CPPUNIT_ASSERT_THROW_MESSAGE(



Mime
View raw message