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

Should you pass exceptions by value or by reference?

0 Answers  


What is a dangling pointer?

3 Answers   Glenwood,


Explain the virtual inheritance in c++.

0 Answers  


What is a c++ vector?

0 Answers  


Who invented turbo c++?

0 Answers  


In the derived class, which data member of the base class are visible?

0 Answers  


What is tellg () in c++?

0 Answers  


What is switch case in c++ syntax?

0 Answers  


What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

0 Answers  


When there is a global variable and local variable with the same name, how will you access the global variable?

0 Answers  


what is an array

20 Answers  


Name the debugging methods that are used to solve problems?

0 Answers  


Categories