Originally Posted by
manasij7479
> i am using constructors to access variables
What ? Do you mean initialize ?
You have to give short examples of the 'ways' you saw, to recieve any meaningful answer.
Destructors, as their name says, destroy.
Suppose you have a 'human' object.
When the human dies, a lot of work has to be done.. (funeral, death certificate ..etc !).
It is the destructor's responsibility to do that cleanup work.
Also get familiar with the "Rule of Three", while you're at it.