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
Which programming language is best to learn first?
What are the 3 levels of programming languages?
What is the difference between a type-specific template friend class and a general template friend class?
What is meant by a delegate?
What is ios :: in in c++?
What is std :: flush?
What is null pointer and void pointer?
How is c++ used in the real world?
Can member functions be private?
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
Which function cannot be overloaded c++?
In c++, what is the difference between method overloading and method overriding?
What is implicit pointer in c++?
What is size of string in c++?
What is the maximum combined length of command line arguments including the space between adjacent arguments?