Re: [PHP-DEV] Memory leaks in PHP_4_3 and HEAD

2003-07-29 Thread Moriyoshi Koizumi
On Tue, 29 Jul 2003 13:52:39 +0200 Magnus Maatta <[EMAIL PROTECTED]> wrote: > class a { > var $items = array(); > function a() { > } > > } > class b { > var $a; > function b(&$a) { > $this->a = &$a; > } > } > $a = new a(); > for ($i = 0; $i <= 4; $i++) { > $a-

[PHP-DEV] Memory leaks in PHP_4_3 and HEAD

2003-07-29 Thread Magnus Maatta
a = &$a; } } $a = new a(); for ($i = 0; $i <= 4; $i++) { $a->items[] = new b($a); } print_r($a); ?> With PHP5: [4] => b Object ( [a] => a Object *RECURSION* ) ) ) /opt/dev/php/php5/Zend/zend_hash.c(374) : Freeing