0

What is the use of virtual destructors?

10th Jun 2017, 4:20 PM
Gagan
Gagan - avatar
2 Réponses
+ 1
a virtual destructor in a base class delegates the object destruction to the subclass that inherits from it. As a general rule of thumb, if you are inheriting from the class you should give it a virtual destructor.
13th Jun 2017, 5:35 AM
Sean Patrick Franklin
Sean Patrick Franklin - avatar
0
thanks
17th Jun 2017, 6:13 PM
Gagan
Gagan - avatar