|
Boost : |
Subject: Re: [boost] [test] console_test_runner ported on *nix
From: Gennaidy Rozental (rogeeff_at_[hidden])
Date: 2008-09-19 01:31:04
Kevin Sopp <baraclese <at> googlemail.com> writes:
>
> >> ==3513== Invalid read of size 4
> >> ==3513== at 0x40936E0: boost::unit_test::framework_impl::clear()
> >> (framework.ipp:133)
> >
> > Not sure what it complains about. This line
> > delete (test_case const*)tu.second;
> >
> > deletes instance to unit_test.
>
> Yes, I believe you delete it twice. One time via
> framework_impl::clear() and then ~test_unit() calls
> framework::deregister_test_unit( this ); which will try to erase
> itself from the map again.
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk