What is virtual destructors? Why they are used?
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 |
What is microsoft c++ redistributable?
Define a pointer to a data member of the type pointer to pointer?
What is pure virtual function?
How long will it take to learn programming?
How to declare a function pointer?
Can you explicitly call a destructor on a local variable?
What is constructor in C++?
Will this c++ program execute or not?
How can you create a virtual copy constructor?
Can class objects be passed as function arguments?
How would perform Pattern Matching in C++?
What is ostream in c++?