3 ms·
> a virtual destructor is only required when the class, or its base classes, already have another virtual function Your derived class only needs a virtual dest
by cpeterso 15y ago
> a virtual destructor is only required when the class, or its base classes, already have another virtual function
Your derived class only needs a virtual destructor if the base class's destructor is public. If the base class destructor is protected (or private), then no one can call delete on a pointer to a base class.
- copper 15y agoThis is why I rather enjoy discussing horrible hairy corner cases like this - there's always something I've overlooked :)