Deletion of an object via a pointer to its base class is undefined unless the base has a virtual destructor. Even with a virtual destructor, the order of deletion may not be what immediately comes to mind.
For more information, see this destructor reference.