Large Objects


Which option is best to eliminate the memory problem?

A. use smart pointers
B. use smart pointers
C. use virtual destructor
D. both a & c

Answer : Option D

Explanation :

Explanation:Virtual destructor means is that the object is destructed in reverse order in which 

it was constructed and the smart pointer will delete the object from memory when the object 

goes out of scope.