Does derivated class inherit base class destructor (constructor)?
I have:
Code:
class A { Code:
class B: public A { Code:
B::~B () { Thanks. |
A's destructor will be invoked automatically
|
there is no need to explicity invoke the destructor.. you do need to make the base class destructor virtual. if you inherit from a class, that base class needs to have a virtual destructor.. ALWAYS, otherwise bad things will follow!
|
All times are GMT -5. The time now is 01:22 AM. |