Hi. In a nutshell do you think is best pratice to unset $this at the end of a class (PHP4) ? For instance a method like this:
function destroy() { unset($this); }
$obj = new Foo(); do something $obj->destroy();
Bye.
No point, because it doesn't work; $obj is still set afterwards anyway.
class foo { var $t = 42; function destroy(){unset($this);} } $obj = new foo; $obj->destroy(); echo $obj->t;
Why say $obj->destroy() when you can just say unset($obj)?
Thanks a lot buddy. Now I've got the point. Take care.