Live data from Hacker News

Retiring a favourite C++ joke

ignition-training.com

1–10 of 151 posts

Re: Retiring a favourite C++ joke

#10
It's recommended to use virtual destructors for objects that live on the heap. Say you have a base class pointer to an object of a derived class; with nonvirtual destructors the base class determines the destructor that is called, whereas with virtual destructors it's the derived class that chooses the form of the destructor.
Post reply on HN