From 7da4930b1200e5ba2481f3522187c1dfa79b17a3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 Jul 2014 14:27:23 +0000 Subject: [PATCH] Fix memory leak in ArraysTestCase unit test. Clear the items in PTR array explicitly, this is not done by the array itself. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/arrays/arrays.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/arrays/arrays.cpp b/tests/arrays/arrays.cpp index 0ac0ec195f..44fbf77145 100644 --- a/tests/arrays/arrays.cpp +++ b/tests/arrays/arrays.cpp @@ -713,6 +713,7 @@ void ArraysTestCase::TestSTL() items.push_back(new Item(17)); CPPUNIT_ASSERT_EQUAL( 17, (*(items.rbegin()))->n ); CPPUNIT_ASSERT_EQUAL( 17, (**items.begin()).n ); + WX_CLEAR_ARRAY(items); } void ArraysTestCase::IndexFromEnd()