forcefully destructor in class

Hi,
do we have any scenario in the class where we have to declair destructor explicity?. if we do not declair than it will gives us compiler error.


Not defining a destructor will not give you an error. That doesn't mean you can always do that.
If a structure has some pointers that point to dynamically allocated memory you may want to delete that memory in your destructor..
Topic archived. No new replies allowed.