you can use unset($this), but it'll only work if there are no
other variables referencing to this object. unset only unsets the reference
to value, not the value itself. PHP will unset the value totally, if there
are no references to it anymore.
so using $this = null; , is perhaps the better solut
ce outside the class
Cheers,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
> -Original Message-
> From: Ian [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 2:27 AM
> To: [EMAIL PROTECTED]
>
$this
"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there a way to unset or destroy an object instance from a method
> within its class? I'm trying to write a method that destroys its
> instance but I'm not sure how to refer to the object its
3 matches
Mail list logo