Re:C++ 11 Approved
by cpeterso on Sunday August 14, 2011 @02:47PM
(#2884164)
> 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.
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.