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 a manipulator in c++?
What are the various storage classes in C++?
What is type of 'this' pointer? Explain when it is get created?
How much do coding jobs pay?
Define a nested class.
What is iomanip c++?
List the special characteristics of constructor.
Can a program run without main in c++?
What is the use of data hiding?
What is the output of the following program? Why?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
What is a far pointer? where we use it?
Do you know the problem with overriding functions?
Why should you learn c++?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?