Do abstract base classes need destructors?
Especially when all the derived classes have their own destructors?
C++ abstract base class destructor
C++ abstract base class destructor
Only Human
Re:C++ abstract base class destructor
Yes, otherwise the destructor of the derived class won't be called. It can be abstract, though, so
virtual ~BaseClass() = 0
or something like that will do.
virtual ~BaseClass() = 0
or something like that will do.