
Peter Klotz
1) Why are you insisting on casting tu.second to test_case*?
Actually you want your derived class destroyed but tu.second is a base class pointer of type test_unit*. You can simply call "delete tu.second" if the test_unit destructor is virtual. The whole casting thing is in my opinion just a workaround for not making the destructor virtual.
I disagree. The whole idea is that I do NOT use these pointers polymorphically. And never intended to. This is just a storage for proper memory management, where I've decided to use one array instead of two and thus keep them as test_unit*, knowing that I have correct type at runtime anyway. Making the destructor virtual is only make sense if there are other virtual function (and even in this case there is exception). test_unit has none. Also don't forget that making needlessly class destructor virtual you immediately increase instance size by 4 or 8
2) I am seeing the problem on 32Bit Intel Linux as well, so it is not restricted to 64Bit.
This makes more sense. Gennadiy