Lecture 5 - Slide 8 : 40
Destructors and Inheritance - Virtual Destructors
A class with virtual functions should always have a virtual destructor
Effective C++, Third edition
: Item 7
The C++ Prog. Lang. (4. edition)
: Page 488
Base class A and derived class B with non-virtual destructors - motivation.
Program output.
Base class A and derived class B with virtual destructors.
Program output.
Base class A and derived class B and C with virtual destructors.
Program output.