Reply to Re: imagedestroy and similar

Your name:

Reply:


Posted by ljb on 04/21/07 00:54

jstucklex@attglobal.net wrote:
> ljb wrote:
>>>...
>> The garbage collector does not detect when a resource is used for the last
>> time. It does detect when it goes out of scope. For example, a resource
>> variable local to a function ... when the function returns, the resource
>> should be cleaned up.
>
> One correction - the gc eventually detects when the resource is no
> longer being used. But such detection is almost always not immediate,
> and may in fact take quite some time.

Just for discussion, is there a case where PHP can "detect when the
resource is no longer being used" other than when the variable referencing
the resource goes out of scope? I believe you that there is, but I can't
think of any.

Also are you saying that if the resource is a local variable in a function,
and the function returns, there can be a delay before the resource is
cleaned up (for example, a database connection is closed)?

[Back to original 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

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