Entry
Does PHP have a garbage collector? or how do I release the Memory when I have done with my object ?
Aug 18th, 2004 00:52
Ayse Geertsma, John Wellum,
You don't need to free your memory. Based on what I understand from PHP
the ZEND engine is constantly collecting the garbage. As soon as a
specific part of data loses all links to variables. The number of links
is counted so if the counter reaches zero. For example:
// This line loads a lagre array of images from the animals database
$My_Large_Variable = new ImageCat('animals');
// This line SHOULD free all memory
$My_Large_Variable = NULL;
Please correct me if I'm wrong!