I saw the following sentences from a book
“A difference between a destructor and other member functions is that, if a regular member function has a body at the derived class, only the version at Derived class gets executed. Whereas in case of destructors, both derived as well as base class versions get executed.”
I don't quite understand the above sentences
If I have a base class B and a derived class D
both have a member function say m,
suppose BO is a base class object, if I call BO.m, the member function in B will not be executed but the member function in D will be executed?