|
Posted by gosha bine on 04/20/07 09:10
On 20.04.2007 02:17 André Hänsel wrote:
> Hi,
>
> is there a difference between imagedestroy($ih) and unset($ih)?
No. unset() checks if a variable is referenced elsewhere and if not,
destroys the variable and its value immediately. This is called
"reference counting".
>
> The same with other similar functions like closedir, mysql_close,
> curl_close, mysql_free_result, etc.
Yes, if an extension author took care of registering his destructor in
zend core.
>
> And by the way... will the garbage collector even detect an "implicit
> unset" when a resource is used for the last time?
php doesn't use "garbage collector", memory is reclaimed immediately as
it becomes inaccesible.
>
> Regards,
> André
>
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Navigation:
[Reply to this message]
|