+ 3
What is the purpose of using a destructor?
4 Answers
+ 9
to destroy your enemies!
+ 2
Whenever scope ends or objects gets deleted specificly! We can implement any certain code we want to run in the end (when objects deletes). Also it helps in free up space!!!
+ 1
To destroy unused object and free up memory.
+ 1
to destroy the object memory at time use destructor