Answer Posted / munendra kumar
The simple answer is that a virtual destructor is one that is declared with the virtual attribute.
The behavior of a virtual destructor is what is important. If you destroy an object through a pointer or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be complete.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the classes in c++?
What are the differences between java and c++?
What do you mean by volatile and mutable keywords used in c++?
What is the difference between #import and #include in c++?
Is c++ a float?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
Is c++ a high level language?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What is c++ 11 and c++ 14?
Define friend function.
What is constructor and destructor in c++?
Which format specifier is used for printing a pointer value?
What is the difference between structures and unions?
What is the auto keyword good for in c++?
What is the main purpose of c++?