나는 보고서의이 종류가 있습니다CppUnit을 누설
==20341== 256 bytes in 1 blocks are indirectly lost in loss record 915 of 919 ==20341== at 0x4A0661C: operator new(unsigned long) (vg_replace_malloc.c:220) ==20341== by 0x7F366FA: std::vector<CppUnit::Test*, std::allocator<CppUnit::Test*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<CppUnit::Test**, std::vector<CppUnit::Test*, std::allocator<CppUnit::Test*> > >, CppUnit::Test* const&) (new_allocator.h:88) ==20341== by 0x7F36496: CppUnit::TestSuite::addTest(CppUnit::Test*) (stl_vector.h:610) ==20341== by 0x585B80: TestVectorAlgebra::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&) (testvectoralgebra.h:30) ==20341== by 0x586719: TestVectorAlgebra::suite() (testvectoralgebra.h:42) ==20341== by 0x5948C4: CppUnit::TestSuiteFactory<TestVectorAlgebra>::makeTest() (TestSuiteFactory.h:20) ==20341== by 0x7F2C6B0: CppUnit::TestFactoryRegistry::addTestToSuite(CppUnit::TestSuite*) (TestFactoryRegistry.cpp:149) ==20341== by 0x7F2CAD5: CppUnit::TestFactoryRegistry::makeTest() (TestFactoryRegistry.cpp:136) ==20341== by 0x580760: main (testunit.cpp:88)
나는이 메인이 끝나기 전에 스위트에 추가 테스트하는 사실은 제거되지 않습니다 때문입니다 것 같아요.
CppUnit::TextTestRunner::TestRunner runner;
// Get the top level suite from the registry
CppUnit::Test* myTest =
CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
runner.addTest(myTest->findTest("TestVectorAlgebra"));
가 어떻게 그 시험 등록을 취소 않습니다
이 내가 시험을 등록하는 방법은?
나는이 누수 진단 뿐만 아니라 일부 Windows 메모리 프로파일러와 함께. 나는 CppUnit이 지나치게 조작 된 방법이라고 생각한다. 즉, 그것은 쓰레기입니다. –