Re: [PHP4BETA] Re: [PHP-DEV] PHP 4.0 Bug #2109: Memory leak in each()

From: Date: Sat, 21 Aug 1999 22:56:34 +0000
Subject: Re: [PHP4BETA] Re: [PHP-DEV] PHP 4.0 Bug #2109: Memory leak in each()
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3632@lists.php.net to get a copy of this message
Well, looks like you guys are just going to have to live with that leak. The code that protects Zend from crashing in very dumb cases (like $a["foo"][$a=5]) has its limitations. I'll look at it some more, but from first glance - this case is useless enough for it not to be a big deal. This leak is almost never a big deal - since we can rely on our memory manager to take care of it. Zeev At 21:46 21/08/99 , Thies C. Arntzen wrote:
hmm checked again (latest CVS). if you take out the "$err =" in the last line the leak goes away.. if you leave the "$err =" in and use $tubu uninitalized you get the leaks. weird, tc On Sat, 21 Aug 1999, Andrey Zmievski wrote:
hi, gives the same leak on my machine (latest CVS) - (andrey, are u running with --enable-debug?). ass foo { function affiche_dict() { // $toto = 1; $this->dict["date_message"] = $toto; while (list($key, $val) = each($this->dict)) {} } } uncommenting the $toto = 1 line will "cure" the mem-leaks.
Yes, I am running with --enable-debug. Still no leaks. -Andrey * Change is the only constant. * -- PHP 4 Beta
Thies C. Arntzen                 "One Big-Mac, Small Fries and a Coke!"
Digital Collections             Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93                              20097 Hamburg / Germany
-- PHP 4 Beta
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#3632) next »