I hate answering a programming question badly…

So…yes, to delete a derived type through a base class pointer safely your hierarchy must define a virtual destructor in order to invoke the actual class destructor rather than the destructor associated with the static class of pointer

That being said, the behavior you get when destroying a derived type through a base class pointer is undefined so in practice anything could happen…

So:

class Foo 
{
Bar() 
{
// Some initialization
}
  ~Foo() 
{
// Do something here
}
}

class Bar : public Foo
{
Bar()
{
// Some initialization
}
~Bar() 
{
// Do something here
}
}

Foo *p = new Bar;
delete p;

The results of executing this code are undefined. It likely will execute the destructor for the static type of p (i.e. Foo) but it is perfectly acceptable for it to generate a crash dump or even delete the Bar instance properly.

The correct version of this would declare the base and derived destructors as virtual and ensure that on destruction the destructor associated with the actual (dynamic?) type rather than the static type is executed.