How and when are the destructors called? Is it necessary to write a destructor?

Questions by anoop4real   answers by anoop4real

Showing Answers 1 - 3 of 3 Answers

Destructors in C++ need not be called explicitly. The destructor for a class whether one has defined it or not gets called automatically and all objects associated with the class gets destroyed in the order of descending appearance in the class.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions