Should every class have a virtual destructor?

Every abstract class should either have a, protected destructor, or, virtual destructor. If you’ve got a public non-virtual destructor, that’s no good, since it allows users to delete through that pointer a derived object. Since as we all know, that’s undefined behavior. For an abstract class, you already need a virtual-table pointer in the object, … Read more