Boost Users :
Subject: Re: [Boost-users] [Boost.Test] valgrind complains about invalid reads
From: joel falcou (joel.falcou_at_[hidden])
Date: 2009-12-17 16:37:56
Scott Banachowski wrote:
> By defeating the purpose, I mean it forces code like the following:
> if( ut_detail::test_id_2_unit_type( tu.second->p_id ) == tut_suite )
> delete static_cast<test_suite const*>(tu.second);
> delete static_cast<test_case const*>(tu.second);
> A virtual base case simplifies this code (especially if in the future other classes are added, or in the case of replacement allocator it does the right thing).
I'm jumping in the wagon but this very piece of code leads to a
"incorrect free" on Snow Leopard using g++ 4.2.1 Apple.
Maybe it is related to the virtual matter
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net