I come from PHP and so, as the title says - I wonder if there is a similar equivalent to PHP\'s native class method __destruct().
I just want to avoid writing the same co