Author: tabish
Date: Mon Jul 23 22:20:06 2012
New Revision: 1364823
URL: http://svn.apache.org/viewvc?rev=1364823&view=rev
Log:
Fix a memory leak in the entry iterator
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h?rev=1364823&r1=1364822&r2=1364823&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h Mon
Jul 23 22:20:06 2012
@@ -196,7 +196,9 @@ namespace util {
if (prevEntry == NULL){
int index = currentEntry->origKeyHash &
(associatedMap->elementData.length() - 1);
+ HashMapEntry* removed = associatedMap->elementData[index];
associatedMap->elementData[index] =
associatedMap->elementData[index]->next;
+ delete removed;
} else {
prevEntry->next = currentEntry->next;
}