Re: [PHP-DEV] PHP 4.0 Bug #2109: Memory leak in each() From: Andrey Zmievski (zmievski <email protected>)
Date: 08/20/99

christophe.massiot <email protected> wrote:
> The following script :
>
> <?
> class foo {
> function affiche_dict() {
> $this->dict[date_message] = $toto;
> while (list($key, $val) = each($this->dict)) {}
> }
> }
> $bar = new foo;
> $err = $bar->affiche_dict();
> ?>
>
> produces :
>
> 1:22 [webase3:p3] titi:~/html% php test.php
> Content-Type: text/html
>
> test.php: Freeing 0x080F0308 (41 bytes), allocated in zend_hash.c on line
175<br>
> test.php: Freeing 0x080F02B8 (35 bytes), allocated in zend_hash.c on line
380<br>
> test.php: Freeing 0x080F5D48 (4 bytes), allocated in zend_hash.c on line
391<br>
>

The script works fine on my machine..

-Andrey
Hacker: Any person who derives joy from
        discovering ways to circumvent limitations.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>