Hi,
I have a problem with 'slicing' when deleting an object allocated on the heap using a base class pointer. The base class is a std:list. Because the std::list does not have a virtual destructor, the derived class object will be sliced and therefore leak if I delete it with a std::list *ptr.
I appreciate this sounds a little wierd, but this requirement comes from dependencies within a legacy code base. This application runs on Solaris.
I feel sure the solution must be straight forward enough, but I just can't identify it right now.
Help much appreciated..