In C++, what’s a virtual destructor and when is it needed? As you may know, in C++ a destructor is generally used to deallocate memory and do some other cleanup for a class object and it’s class members whenever an object is destroyed. Destructors are distinguished by the tilde, the ‘~’ that appears in front … Continue reading In C++, what’s a virtual destructor and when is it needed?