[PHP] Re: unsetting an instance from within its class

2002-04-11 Thread Michael Virnstein
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

RE: [PHP] Re: unsetting an instance from within its class

2002-04-10 Thread Maxim Maletsky
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] >

[PHP] Re: unsetting an instance from within its class

2002-04-10 Thread Ian
$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