Something that others may have overlooked is your destructors.
Make sure your derived class destructors are declared virtual so the base class destructors are correctly called.
As a general rule, I make all of my destructors virtual so that I don't run into this type of problem.
So, in short, change all of your class destructors to virtual, and see what happens.
Hope this helps,
- Nigel
