Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is virtual destructor? Why?

Answers were Sorted based on User's Feedback



What is virtual destructor? Why?..

Answer / sagarika patra

When a destructor is declared as virtual in the base class
is known as virtul destructor.

Whenever any object of derived class of base type is freed
(using delete operator),the destructor of the derived class
is called and the memory allocated by derived class
variables are freed ,leaving the memory allocated by the
base class variables as unfreed.

Hence by declaring the base class destructor as
virtual,both the destructor will called in order.

Is This Answer Correct ?    9 Yes 0 No

What is virtual destructor? Why?..

Answer / mugdha taru

virtual destructor are those who can not override while
redefining derived class.

Is This Answer Correct ?    2 Yes 3 No

What is virtual destructor? Why?..

Answer / 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

More OOPS Interview Questions

What are the features of oop?

0 Answers  


what is overloading

3 Answers   MindCracker,


why we are declare the function in the abstract class even though we are declaring it in Derived class?

1 Answers   TCS,


what is multi level inheritance give n example ?

13 Answers   HDFC, Hulas Steel, Ness Technologies,


some one give d clear explanation for polymorphism

3 Answers  


Which is the parameter that is added to every non-static member function when it is called?

3 Answers   Accenture,


i have to create a view in SQL as like in ORACLE DATA EXPRESS EDITION

2 Answers   CTS,


what is the difference b/w abstract and interface?

2 Answers   Merrill Lynch, Schneider, Scio Healthcare,


What is a scope operator and tell me its functionality?

3 Answers   emc2,


how to get the oracle certification? send me the answer

0 Answers   Oracle,


What is the oops and benefits of oops programming?

0 Answers  


different types of castings

3 Answers   Siemens,


Categories