Re: Wierd error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We were using unset() for the longest time but found it doesn't
seem to free up the memory.
interesting - you are suggesting that settype does free the memory
directly?

Yes.  Moreso than unset(), at least according to my observations and
tests.

I have seen a number of posts to internals regarding to being able to free up memory in long-running/heavy cli scripts... none of the devs mentioned settype() ... maybe you know something nobody else does :-)

We have a very process intensive script that creates (and destroys) a
large number of objects. As this script gets run again and again, we would see that the memory load would go through the roof and eventually
cause Apache to crash (among other things; btw - this is running on
a windoze box).  We changed all the unset() to settype() and the
memory usage over the same amount of time dropped dramatically -
significantly, in fact.

thnx,
Chris

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux