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
What is constructor in C++?
What are the rules about using an underscore in a c++ identifier?
When do we use copy constructors?
Can I create my own functions in c++?
Can we specify variable field width in a scanf() format string? If possible how?
What is private inheritance?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Write some differences between an external iterator and an internal iterator?
What is the fastest c++ compiler?
Which should be more useful: the protected and public virtuals?
Explain the concept of copy constructor?
Can I uninstall microsoft c++ redistributable?
What do you mean by delegate? Can a user retain delegates?
Describe exception handling concept with an example?
What is flag in computer?