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 two types of comments, and how do they differ?
Discussion on error handling of C++ .
What is switch case in c++ syntax?
How much do c++ programmers make?
Explain virtual destructor?
What is endianness?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
What can I use instead of namespace std?
Write a program using display() function which takes two arguments.
If all is successful, what should main return a) 0 b) 1 c) void
How do we implement inheritance in c++?
Does c++ cost money?
How do you traverse a btree in backward in-order?
Who was the creator of c++?
Can we make any program in c++ without using any header file and what is the shortest program in c++.