Re: Garbage Collection!
| From: | Zeev Suraski | Date: | Fri, 17 May 2002 18:36:08 +0000 |
| Subject: | Re: Garbage Collection! | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84155@lists.php.net to get a copy of this message | ||
If you're adding elements to a hash you created using array_init(), and you're using the standard macros (which apparently you are) - then yes, the engine will take care of garbage collection for you.
At 09:27 PM 5/17/2002, Robert Cummings wrote:
Zeev Suraski wrote: At 09:04 PM 5/17/2002, Robert Cummings wrote:To be honest I'm passing the return_value into my recursionNot sure what you mean by that - return_value is handled by the engine as soon as you return from your function implementation, if that's what you're asking. If you're using it internally, then you're responsible for it until you return from your code. Well I'm creating a nested hash that I want to return ultimately, so at my first recursive step I pass return_value as the hash to be filled. However at various steps in the recursion I add elements to the hash that overwrite default values. So my question is whether during this recursive process does the garbage collector run when I overwrite a hash entry? Hope that clears things up. Cheers, Rob. -- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:robert.cummings@webmotion.com || Phone : (613) 731-4046 x.109 |:----------------------------------------------:| Website : http://www.webmotion.com | | Fax : (613) 260-9545 |`----------------------------------------------'