Hacker News new | ask | show | jobs
by quizotic 4209 days ago
for example: http://stackoverflow.com/questions/461203/when-to-use-virtua...

class B : public A { ... } void foo() { A* someA = new B(...); ... delete someA; }

if A destructor is not virtual, then B's resources leak.