A base class usually needs a virtual destructor to allow objects in the inheritance hierarchy to be dynamically allocated. The virtual destructor must free dynamically alloacted resources in its class if so, otherwise, an empty virtual destructor is enough.