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 polymorphism in oops with example?
What is abstraction with example?
What is abstract class in oop?
What is object in oops?
What is advantage of inheritance?
What is encapsulation selenium?
What type of loop is a for loop?
What do you mean by overloading?
What is for loop and its syntax?
Can you explain polymorphism?
Write a program to sort the number with different sorts in one program ??
Plese get me a perfect C++ program for railway/airway reservation with all details.
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
Advantage and disadvantage of routing in telecom sector
What is the example of polymorphism?