mirror of
https://github.com/boostorg/serialization.git
synced 2026-02-22 03:32:25 +00:00
Fix some memory leaks in tests
This commit is contained in:
@@ -143,6 +143,7 @@ int test2(){
|
||||
ia >> BOOST_SERIALIZATION_NVP(j2);
|
||||
}
|
||||
BOOST_CHECK(*j1 == *j2);
|
||||
delete j1;
|
||||
BOOST_CHECK(j2 == j2->j);
|
||||
std::remove(testfile);
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
@@ -44,6 +44,7 @@ int test_main( int /* argc */, char* /* argv */[] )
|
||||
}
|
||||
BOOST_CHECK(tb != tb1);
|
||||
BOOST_CHECK(*tb == *tb1);
|
||||
delete tb;
|
||||
std::remove(testfile);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@ test_main( int /* argc */, char* /* argv */[] )
|
||||
BOOST_CHECK(1 == save_count);
|
||||
BOOST_CHECK(1 == load_count);
|
||||
BOOST_CHECK(*bp2 == *bp);
|
||||
delete bp;
|
||||
std::remove(testfile);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
@@ -87,6 +87,7 @@ void save_exported(const char *testfile)
|
||||
|
||||
delete rb1;
|
||||
delete rb2;
|
||||
delete rd21;
|
||||
}
|
||||
|
||||
// save exported polymorphic class
|
||||
|
||||
@@ -117,5 +117,8 @@ int test_main(int /* argc */, char * /* argv */[])
|
||||
// Try to save and load pointers to Bs, to an xml archive
|
||||
test_save_and_load<xml_oarchive, xml_iarchive>(b, b1);
|
||||
|
||||
delete a;
|
||||
delete b;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ int test_main( int /* argc */, char* /* argv */[] )
|
||||
}
|
||||
BOOST_CHECK(ta != ta1);
|
||||
BOOST_CHECK(*ta == *ta1);
|
||||
delete ta;
|
||||
std::remove(testfile);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user