Welcome Guest, Not a member yet? Register   Sign In
Free the space
#2

[eluser]BrianDHall[/eluser]
If you unset() all references to a variable it will be freed, and PHP and it's garbage collector will (at its discretion) release memory. Or it will do it at the end of the script execution.

http://www.php.net/manual/en/function.gc...cycles.php

gc_collect_cycles() was made available in PHP 5.3 to force the gargabe collector to do its magic, but there are few good reasons to do this. If you are running out of memory PHP will call its GC on it's own - so just use unset() in certain situations where memory usage becomes a problem.


Messages In This Thread
Free the space - by El Forum - 12-22-2009, 07:58 PM
Free the space - by El Forum - 12-22-2009, 11:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB