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...

Why and when is a virtual destructor needed?

Answer Posted / hemlata selokar

At the time of inheritance, when we are deleting the object
of derived class with the help of base class pointer that
time virtual destructors are used... After making base class
destructor as virtual, the derived class destructor is
called first followed by base class destructor...With the
help of this proper sequence is maintained and helps in
proper execution.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe these concepts: Polymorphism, Inheritance and Abstraction.

1189


Is abstract thinking intelligence?

1046


What is debug class?what is trace class? What differences are between them? With examples.

2189


Why polymorphism is used in oops?

1046


Which method cannot be overridden?

1088


what is the drawback of classical methods in oops?

3378


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2374


What makes a language oop?

1053


write knight tour problem which is present in datastructure

2649


what is graphics

2446


Why multiple inheritance is not allowed?

1152


What is the purpose of polymorphism?

1122


Why is abstraction used?

1089


can inline function declare in private part of class?

4404


What is the purpose of enum?

1007