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 destructors? Why they are used?



What is virtual destructors? Why they are used?..

Answer / hrpynux@gmail.com

Virtual destructors in C++ are used to avoid memory leaks especially when your class contains unmanaged code, i.e., contains pointers or object handles to files, databases or other external objects. A destructor can be virtual. ... Now, suppose you create an instance of the Derived class using a Base class pointer.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What's the hardest coding language?

0 Answers  


What is Name Decoration?

2 Answers   Lucent,


Explain the ISA and HASA class relationships. How would you implement each in a class design?

3 Answers  


How do you invoke a base member function from a derived class in which you have not overridden that function?

0 Answers  


What are the effects after calling the delete this operator ?

0 Answers  


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

0 Answers  


Define the process of handling in case of destructor failure?

0 Answers  


What is constant in c++ with example?

0 Answers  


How to write a program such that it will delete itself after exectution?

3 Answers  


What is enum c++?

0 Answers  


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

0 Answers  


Is c++ a pure oop language?

0 Answers  


Categories