From: christian at shockwaved dot com
Operating system: FreeBSD
PHP version: 4.2.3
PHP Bug Type: Class/Object related
Bug description: Memory leak when creating reference to $this
We have gone through some testing and found that PHP leaks quite some
ressources when creating references to $this. Here's an example script:
<?php
class foo {
var $me;
function foo() {
$this->me = &$this;
}
}
while ($i++ < 100000) {
$bar = new foo();
unset($bar);
}
sleep(42);
?>
Can we do anything else to provide you with means to solve this problem?
--
Edit bug report at http://bugs.php.net/?id=22293&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22293&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22293&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22293&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22293&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22293&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22293&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22293&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22293&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22293&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22293&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22293&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22293&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22293&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22293&r=gnused