Answer Posted / nakul 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 baller 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 is data abstraction? How is it different from data encapsulation?
What does asterisk mean in c++?
Why are arrays usually processed with for loop?
Is linux written in c or c++?
Is the declaration of a class its interface or its implementation?
What is data binding in c++?
How can you create a virtual copy constructor?
Write my own zero-argument manipulator that should work same as hex?
What happens when the extern "c" char func (char*,waste) executes?
What are abstract data types in c++?
What is data types c++?
What is c++ and its features?
Can you write a function similar to printf()?
What is a dangling pointer in c++?
Are there interfaces in c++?