Computer Science, asked by sidharth12, 1 year ago

what is a destructor in c++

Attachments:

Answers

Answered by Anonymous
2
a destructor  is a method which is automatically invoked when the object is destroyed.
Answered by gokujane
2
Destructor is a special member function that always executes when compiler is destroying an object. It is used to free allocated memory, close and dispose used resources and for any other things which we want to execute before destroy an object.
Similar questions