================== Virtual Destructor ================== -------- Examples -------- C++ === .. code-block:: cpp class Person { public: ~Person() { cout << "Deleting a person." << endl; } }; class Student : public Person { public: ~Student() { cout << "Deleting a student." << endl; } }; int main() { Person * p = new Student(); delete p; }