What is a virtual destructor?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
How are pointers type-cast?
What is class syntax c++?
Explain about profiling?
Define vptr.
What is optimization in c++? when using volatile.optimization is not possible..what does this mean?
Comment on local and global scope of a variable.
What is pointer -to-members in C++? Give their syntax?
What is the difference between #import and #include in c++?
Is c++ the most powerful language?
What is the difference between a copy constructor and an overloaded assignment operator?
4 Answers Belzabar, Citrix, Microsoft, Wipro,
What is a far pointer? where we use it?
What is the best ide for c++?