Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Destructor or Deconstructor with regards to OOP?

In my daily life and while reading books I've seen the term destructor as well as deconstructor.

But what is the correct name for this method?


1 Answers

It is destructor used to cleanup the stuff when the object is about to die. It is called automatically if specified when object is going to be removed/die.

More Info:

http://en.wikipedia.org/wiki/Destructor_%28computer_science%29

like image 187
Sarfraz Avatar answered Sep 13 '25 07:09

Sarfraz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!