#include <iostream> using namespace std; struct parent { virtual void predispose() { cout << "parent"; } ~parent() { predispose(); } }; struct child : parent { void predispose() override { cout << "child"; } }; int main() { auto* a = new child(); delete a; }