C
Chunhui Han
Hi,
I was recently reading about virtual base classes in C++. The book I was
reading says that it is illegal to have non-virtual destructor for the
virtual base class. It seems to me that virtual destructors are essential
when the class has virtual functions, since this class is supposed to be
used as a base class for polymorphism. But what is the real reason for a
virtual destructor in a virtual base class?
Thanks,
C.H.
I was recently reading about virtual base classes in C++. The book I was
reading says that it is illegal to have non-virtual destructor for the
virtual base class. It seems to me that virtual destructors are essential
when the class has virtual functions, since this class is supposed to be
used as a base class for polymorphism. But what is the real reason for a
virtual destructor in a virtual base class?
Thanks,
C.H.