Virtual destructor with virtual members in C++11
As the author of the slides I’ll try to clarify. If you write code explicitly allocating a Derived instance with new and destroying it with delete using a base class pointer then you need to define a virtual destructor, otherwise you end up with incompletely destroying the Derived instance. However, I recommend to abstain from … Read more