I\'ve got a large set of inherited classes (criteria) which inherit from a base class (criterion). Here\'s criterion\'s code
class criterion
{
p
The recommendation is to insert:
virtual ~criterion() {}
Starting from C++11, you can use = default; instead of an empty body {}.
This is to avoid problems with deleting from a base class' pointer. Otherwise you will leak memory as derived classes' destructors will not be called.
criterion *c = new fastFilter();
delete c; // leaks