Kaydet (Commit) d967e03a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix memory leaks in test code

Change-Id: I0dbb2546f1e776ebf95b61c16ebedbce0ead4c7f
üst 278baa55
...@@ -68,6 +68,7 @@ public: ...@@ -68,6 +68,7 @@ public:
CPPUNIT_ASSERT( aVec.erase(p2) == 0 ); CPPUNIT_ASSERT( aVec.erase(p2) == 0 );
aVec.DeleteAndDestroyAll(); aVec.DeleteAndDestroyAll();
delete p1;
delete p2; delete p2;
delete p4; delete p4;
} }
...@@ -118,6 +119,9 @@ public: ...@@ -118,6 +119,9 @@ public:
aVec2.insert( aVec1 ); aVec2.insert( aVec1 );
CPPUNIT_ASSERT( aVec2.size() == 3 ); CPPUNIT_ASSERT( aVec2.size() == 3 );
delete p1;
delete p2;
delete p3;
} }
void testLowerBound() void testLowerBound()
...@@ -134,6 +138,9 @@ public: ...@@ -134,6 +138,9 @@ public:
CPPUNIT_ASSERT( aVec.lower_bound(p1) == aVec.begin() ); CPPUNIT_ASSERT( aVec.lower_bound(p1) == aVec.begin() );
CPPUNIT_ASSERT( aVec.lower_bound(p4) == aVec.end() ); CPPUNIT_ASSERT( aVec.lower_bound(p4) == aVec.end() );
delete p1;
delete p2;
delete p3;
delete p4; delete p4;
} }
...@@ -193,7 +200,9 @@ public: ...@@ -193,7 +200,9 @@ public:
CPPUNIT_ASSERT( aVec.size() == 3 ); CPPUNIT_ASSERT( aVec.size() == 3 );
aVec.DeleteAndDestroyAll(); aVec.DeleteAndDestroyAll();
delete p1;
delete p2; delete p2;
delete p2_3;
delete p4; delete p4;
} }
...@@ -245,6 +254,8 @@ public: ...@@ -245,6 +254,8 @@ public:
aVec.DeleteAndDestroyAll(); aVec.DeleteAndDestroyAll();
CPPUNIT_ASSERT( aVec.size() == 0 ); CPPUNIT_ASSERT( aVec.size() == 0 );
delete p1;
delete p1_3;
delete p4; delete p4;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment