KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I understand the need for a virtual destructor. But why do we need a pure virtual destructor? In one of the C++ articles, the author has mentioned that we use pure virtual destructor when we want to make a class abstract. But we can make a class abstract by making any of the member functions as pure virtual. So my questions are When do we really make a destructor pure virtual? Can anybody give a good real time example? When we are creating abstract classes is it a good practice to make the destructor also pure virtual? If yes..then why?
Tags (comma-separated)
Save Edits
Cancel