You are here: Re: imagedestroy and similar « PHP Programming Language « IT news, forums, messages
Re: imagedestroy and similar

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация