Re: Memory Leak in Zend: Test case and leak

From: Date: Mon, 26 Jun 2000 11:17:11 +0000
Subject: Re: Memory Leak in Zend: Test case and leak
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-22337@lists.php.net to get a copy of this message
Hi, I can't reproduce the memory leak with latest CVS, Apache 1.3.12, Suse 6.3. What happens when using this script: <?php class Foo { var $foo; var $Bar; function Foo() { $this->Bar = new Bar(); $this->foo = $this->Bar->leak(); // ^^^ } } class Bar { function &leak() { // ^^^ return $leaky; } } $baz = new Foo(); ?> Regards, Stefan -----Ursprüngliche Nachricht----- Von: Joey Smith <joey@joeysmith.com> An: <php-dev@lists.php.net> Gesendet: Montag, 26. Juni 2000 12:22 Betreff: [PHP-DEV] Memory Leak in Zend: Test case and leak > Don't really have access to bugs.php.net where I am, > so I'm posting it here...will try to get it up on > bugs.php.net later. > > I realize that this script shouldn't do anything, but > it shouldn't leak memory, right? > > Short desc: > > class Foo > var Bar: Hold copy of class Bar > var foo: Tries to get a reference to > return value of $this->Bar->leak() > > class Bar > function leak() returns non-initialized variable $var > > Leak occurs as soon as I try to instance Foo(). > > > -- > Joey Smith > ---------------------------------------------------------------------------- ---- > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#22337) next »