Featured post

IBPS SO IT TRICKS TO GET FULL MARKS

JOIN GROUP-  https://www.facebook.com/groups/bankibpssoit/ If you wish to get full marks in IBPS SO IT . We will provide you the gui...

Destructors



POST:
A destructor is a special kind of class member function that is executed when an object of that class is destroyed.
A destructor doesn't have parameters, so there can be only one. overload  is not possible with Destructors. Also to add that destructor is used to terminate the instance of the class and release all resources which it is using.

If the object was created as an automatic variable, its destructor is automatically called when it goes out of scope. If the object was created with a new expression, then its destructor is called when the delete operator is applied to a pointer to the object.

Destructors do not return a value.
||

No comments:

Post a Comment

You will get Reply with in 24 hours