C++ Destructors

C++ Destructor :-
A destructor is used to to destroy the object that have been
created by a constructor.
Destructor is the member function, whose name is same as the
name of the class but it is preceded by a tilde.
Example :-
-abc(){  }
C++ Destructor never takes any argument nor does it return any value.
We use delete to free the memory of the constructor.

Follow Us

Contact Us


Back to Top