diff --git a/Code/Mantid/Framework/API/test/AlgorithmHistoryTest.h b/Code/Mantid/Framework/API/test/AlgorithmHistoryTest.h index d701d43e1c90..8636bca963e1 100644 --- a/Code/Mantid/Framework/API/test/AlgorithmHistoryTest.h +++ b/Code/Mantid/Framework/API/test/AlgorithmHistoryTest.h @@ -72,7 +72,7 @@ class AlgorithmHistoryTest : public CxxTest::TestSuite TS_ASSERT_EQUALS(compareAlg->getPropertyValue("arg2_param"), "5"); Mantid::API::AlgorithmFactory::Instance().unsubscribe("testalg1",1); - + delete testInput; } private: diff --git a/Code/Mantid/Framework/API/test/ExperimentInfoTest.h b/Code/Mantid/Framework/API/test/ExperimentInfoTest.h index 7594db85b9be..61ba1e7b687d 100644 --- a/Code/Mantid/Framework/API/test/ExperimentInfoTest.h +++ b/Code/Mantid/Framework/API/test/ExperimentInfoTest.h @@ -315,6 +315,7 @@ class ExperimentInfoTest : public CxxTest::TestSuite ExperimentInfo * ws2 = ws.cloneExperimentInfo(); do_compare_ExperimentInfo(ws,*ws2); + delete ws2; } void test_clone_then_copy() @@ -335,6 +336,8 @@ class ExperimentInfoTest : public CxxTest::TestSuite ws3.copyExperimentInfoFrom(ws2); do_compare_ExperimentInfo(ws,ws3); + + delete ws2; } void test_default_emode_is_elastic() diff --git a/Code/Mantid/Framework/API/test/MatrixWorkspaceMDIteratorTest.h b/Code/Mantid/Framework/API/test/MatrixWorkspaceMDIteratorTest.h index 18964eea49d4..89f8fc417175 100644 --- a/Code/Mantid/Framework/API/test/MatrixWorkspaceMDIteratorTest.h +++ b/Code/Mantid/Framework/API/test/MatrixWorkspaceMDIteratorTest.h @@ -86,6 +86,7 @@ class MatrixWorkspaceMDIteratorTest : public CxxTest::TestSuite TS_ASSERT_DELTA( it->getError(), 22.0, 1e-5); TS_ASSERT_DELTA( it->getCenter()[0], 3.0, 1e-5); TS_ASSERT_DELTA( it->getCenter()[1], 2.0, 1e-5); + delete it; } @@ -94,7 +95,9 @@ class MatrixWorkspaceMDIteratorTest : public CxxTest::TestSuite { boost::shared_ptr ws = makeFakeWS(); // The number of output cannot be larger than the number of histograms - TS_ASSERT_EQUALS( ws->createIterators(10, NULL).size(), 4); + std::vector it = ws->createIterators(10, NULL); + TS_ASSERT_EQUALS( it.size(), 4); + for ( size_t i = 0; i < it.size(); ++i ) delete it[i]; // Split in 4 iterators std::vector iterators = ws->createIterators(4, NULL); @@ -117,6 +120,7 @@ class MatrixWorkspaceMDIteratorTest : public CxxTest::TestSuite TS_ASSERT( it->next() ); TS_ASSERT( it->next() ); TS_ASSERT( !it->next() ); + delete it; } } @@ -130,6 +134,7 @@ class MatrixWorkspaceMDIteratorTest : public CxxTest::TestSuite TS_ASSERT_EQUALS(det->isMasked(), it->getIsMasked()); it->next(); } + delete it; } diff --git a/Code/Mantid/Framework/API/test/SpectraAxisTest.h b/Code/Mantid/Framework/API/test/SpectraAxisTest.h index 886ba82b47c2..4a4bb8809827 100644 --- a/Code/Mantid/Framework/API/test/SpectraAxisTest.h +++ b/Code/Mantid/Framework/API/test/SpectraAxisTest.h @@ -32,6 +32,7 @@ class SpectraAxisTest : public CxxTest::TestSuite ~SpectraAxisTest() { delete spectraAxis; + delete ws; } void testConstructor()