What is the purpose of using a destructor?
to destroy your enemies!
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!!!
To destroy unused object and free up memory.
to destroy the object memory at time use destructor