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
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
Is c++ a float?
How do you write a function that can reverse a linked-list?
Explain container class.
Explain the purpose of the keyword volatile.
What are the benefits of c++?
Can we overload operator in c++?
How do I use arrays in c++?
What is pointer with example?
What is the full form of stl in c++?
What is the use of data hiding?
What is long in c++?
What are exceptions c++?
What is a .lib file in c++?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()