Re: foreach and destroying variables for memory saving
| From: | Per Jessen | Date: | Wed, 10 Dec 2008 13:47:35 +0000 |
| Subject: | Re: foreach and destroying variables for memory saving | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284415@lists.php.net to get a copy of this message | ||
Tim | iHostNZ wrote:
> Somewhere i also read that one can save a lot of memory by destroying
> variables. Is that done with unset, setting it to null or something
> similar?
unset()
> So, i take there is no garbage collection in php? I've never
> actually looked at the c source code of php. Maybe its time to
> actually do that. But it might be easier if someone can answer this
> from the top of their head.
There is no real need - most PHP code runs in apache with each request
being separately initated and terminated. There's no underlying
runtime manager as such.
/Per Jessen, Zürich