Answer Posted / 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 View All Answers
How a modifier is similar to mutator?
Define linked lists with the help of an example.
What do you mean by const correctness?
What is the difference between global int and static int declaration?
Which programming language's unsatisfactory performance led to the discovery of c++?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
What is a lambda function c++?
What do you mean by vtable and vptr in c++?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
What is the use of default constructor?
Explain Text Manipulation Routines?
What is a terminating character in c++?
What is a multimap c++?
How can you quickly find the number of elements stored in a static array?
Is oops and c++ same?