Arthur Erdös wrote:
> Hello all,
> 
> is there a way to free memory allocated by variables in PHP?? This is a
> very important issue concerning long running scripts...

this is a recurrent problem - not much can be done about it AFAIK ... I'd
be very glad to be proved wrong.

> 
> I have a script that generates > 5000 Newsletters and when the script
> finishes it uses 1.8 GB (!!) of RAM. Although I am using unset() to
> clean up variables (tried with $var = null too).

okay this does suggest your doing something else very wrong - I personally
have code that regularly generates upto 20,000 individualised newsletters 
without
going anywhere near this ammount of memory - granted I've hit my memory limit
a couple of times and had to jack it up to 128Megs (in practice the script grab 
just over
64Megs when it's doing it's worst).

what version of php are you [ab]using?

> 
> I've read sth about php not giving the allocated memory back to the OS
> until a script finishes, is that right?? Is it possible to free the
> memory "by hand"?
> 
> Any suggestion is appreciated!
> 
> thx in advance
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to