Re: unset( $anobject) does not invoce __destruct()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



typing error sorry

forget my last post

is there a was to destroy an object if there is hold a reference somewhere?

"Stuart" <stuttle@xxxxxxxxx> wrote in message
news:a5f019de0908240606x5fdca70bkb31dd32b072e52b6@xxxxxxxxxxxxxxxxx
> 2009/8/24 kranthi <kranthi117@xxxxxxxxx>:
> > unset($obj) always calls the __destruct() function of the class.
> >
> > in your case clearly you are missing something else. Probably
> > unset($anobject) is not being called at all ?
>
> That's not entirely correct. PHP uses reference counting, so if
> unsetting a variable did not cause the object to be destructed then
> it's highly likely that there is another variable somewhere that is
> holding a reference to that object.
>
> -Stuart
>
> -- 
> http://stut.net/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux