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
Why do we use polymorphism?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
what are the realtime excercises in C++?
i got a backdoor offer in process global,Bangalore..Can i work with it?
What does and I oop mean?
Is react oop?
What do you mean by Encapsulation?
Why is polymorphism needed?
• What are the desirable attributes for memory managment?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
Templates mean
What is the difference between encapsulation and polymorphism?
Whats is abstraction in oops?
is there any choice in opting subjects like 4 out of 7
Why multiple inheritance is not possible?