Garbage collection in php
by Guna[ Edit ] 2012-07-22 10:13:36
What is Garbage Collection?
The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program.
How it is done in PHP?
PHP performs garbage collection at three junctures,
1) When you tell it to. (using
unset() function
2) When you leave a function.
3) When the script ends.