What is virtual destructor? Why?
Answer Posted / riya piyush jain
In object-oriented programming, a destructor (sometimes
shortened to dtor) is a method which is automatically
invoked when the object is destroyed. Its main purpose is
to clean up and to free the resources which were acquired
by the object along its life cycle and unlink it from other
objects or resources invalidating any references in the
process. The use of destructors is key to the concept of
Resource Acquisition Is Initialization.
Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
What is the benefit of oop?
Why do pointers exist?
What is a function in oop?
What are the 3 pillars of oop?
What is class and object with example?
Can private class be inherited?
#include
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
How Do you Code Composition and Aggregation in C++ ?
What is encapsulation c#?
What is an advantage of polymorphism?
What is abstraction oop?
How can you overcome the diamond problem in inheritance?
How to use CMutex, CSemaphore in VC++ MFC
What are different oops concepts?