Re: PHP Memory issues in PHP5 as well?
| From: | Alan Knowles | Date: | Fri, 26 May 2006 00:28:34 +0000 |
| Subject: | Re: PHP Memory issues in PHP5 as well? | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6948@lists.php.net to get a copy of this message | ||
From what I remember you had to turn of the Zend memory manager to make it free memory. (changing the value of a flag in the Zend engine.)
Regards
Alan
Christian Weiske wrote:
Benjamin,But, based on this thread, that may well turn out to be a very bad idea, leading to stability problems. Are these memory issues (not freeing memory when allocated inside a function or PHP class object) also present in PHP5?PHP5 does free memory when unsetting variables. In fact, you can do this: while (true) { $w = new GtkWindow(); } In PHP-Gtk1 (with php4), you would fill up memory within seconds. In PHP5 with PHP-Gtk2, memory usage stays low as the objects are deleted when they aren't used any more. You also can use unset() to free mem, now.