
19 Sep
2008
19 Sep
'08
11:31 a.m.
What happens is that delete (test_case const*) tu.second; first invokes the test_case destructor which will erase the value referenced by tu from the map, then the delete statement continues but tu references deallocated memory now at which point valgrind complains that you do an invalid read of 4 bytes.
These are two distinct operations. clear() will free test unit memory. ~test_unit() will erase itself from framework registry. clear() does not call erase().
Genandiy
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost