diff --git a/tests/base64/base64.cpp b/tests/base64/base64.cpp index ed7ec5565a..d75be1108a 100644 --- a/tests/base64/base64.cpp +++ b/tests/base64/base64.cpp @@ -269,6 +269,8 @@ void Base64TestCase::EncodeDecodeRandom() size_t realsize = size; CPPUNIT_ASSERT(wxBase64Decode(buff2, realsize, (char *)buff, size)); CPPUNIT_ASSERT(wxBase64Encode(buff2, size, buff2, realsize)); + delete[] buff2; + delete[] buff; } void Base64TestCase::DecodeInvalid() diff --git a/tests/fswatcher/fswatchertest.cpp b/tests/fswatcher/fswatchertest.cpp index 6561eb46ee..961da588d4 100644 --- a/tests/fswatcher/fswatchertest.cpp +++ b/tests/fswatcher/fswatchertest.cpp @@ -402,6 +402,7 @@ public: 1, m_events.size() ); + delete e; } virtual void GenerateEvent() = 0; diff --git a/tests/graphics/clippingbox.cpp b/tests/graphics/clippingbox.cpp index 77d1ca16ae..9cf1071cca 100644 --- a/tests/graphics/clippingbox.cpp +++ b/tests/graphics/clippingbox.cpp @@ -1230,6 +1230,7 @@ void ClippingBoxTestCaseDCBase::OneDevRegionNonRect() m_dc->DeviceToLogicalXRel(clipW), m_dc->DeviceToLogicalYRel(clipH), 1); CheckClipShape(bmpRef, 1); + delete memDC; } void ClippingBoxTestCaseDCBase::OneDevRegionAndReset() diff --git a/tests/graphics/measuring.cpp b/tests/graphics/measuring.cpp index 8bcd85e88a..397f586421 100644 --- a/tests/graphics/measuring.cpp +++ b/tests/graphics/measuring.cpp @@ -183,6 +183,7 @@ void MeasuringTextTestCase::GraphicsGetTextExtent() context->SetFont(font, *wxBLACK); double width, height, descent, externalLeading = 0.0; context->GetTextExtent("x", &width, &height, &descent, &externalLeading); + delete context; // TODO: Determine a way to make these tests more robust. CPPUNIT_ASSERT(width > 0.0); diff --git a/tests/thread/atomic.cpp b/tests/thread/atomic.cpp index b85c99d849..7fae5d69fe 100644 --- a/tests/thread/atomic.cpp +++ b/tests/thread/atomic.cpp @@ -146,6 +146,7 @@ void AtomicTestCase::TestWithThreads(int count, ETestType testType) if ( thread->Create() != wxTHREAD_NO_ERROR ) { wxLogError(wxT("Can't create thread!")); + delete thread; } else threads.Add(thread); @@ -161,6 +162,7 @@ void AtomicTestCase::TestWithThreads(int count, ETestType testType) { // each thread should return 0, else it detected some problem CPPUNIT_ASSERT (threads[i]->Wait() == (wxThread::ExitCode)0); + delete threads[i]; } CPPUNIT_ASSERT( int1 == 0 ); diff --git a/tests/thread/queue.cpp b/tests/thread/queue.cpp index be6e886fa5..42ceb319c5 100644 --- a/tests/thread/queue.cpp +++ b/tests/thread/queue.cpp @@ -130,6 +130,7 @@ void QueueTestCase::TestReceive() // if it returns a negative, then it detected some problem. wxThread::ExitCode code = threads[i]->Wait(); CPPUNIT_ASSERT_EQUAL( code, (wxThread::ExitCode)wxMSGQUEUE_NO_ERROR ); + delete threads[i]; } } @@ -162,6 +163,8 @@ void QueueTestCase::TestReceiveTimeout() CPPUNIT_ASSERT_EQUAL( code1, (wxThread::ExitCode)wxMSGQUEUE_NO_ERROR ); CPPUNIT_ASSERT_EQUAL( code2, (wxThread::ExitCode)wxMSGQUEUE_TIMEOUT ); + delete thread2; + delete thread1; } // every thread tries to read exactly m_maxMsgCount messages from its queue