What is a virtual destructor?

A virtual destructor is used to free up the memory space allocated by the derived class object or instance while deleting instances of the derived class using a base class pointer object .

Sizin İçin Seçtik  What are destructors in C++?

Leave a Reply

Your email address will not be published. Required fields are marked *