
17 Dec
2009
17 Dec
'09
9:37 p.m.
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
(tu.second); else delete static_cast (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