Home » Interview » Technology

what is the use of virtual destructor in c++?

Correct Answer: A destructor is automatically called when the object is destroyed A virtual destructor in C++ is used primarily to prevent resource leaks by performing a clean-up of the object

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion