#27376 [Opn->Bgs]: Array recrusion make Memory leak

From: Date: Tue, 24 Feb 2004 13:40:17 +0000
Subject: #27376 [Opn->Bgs]: Array recrusion make Memory leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-55447@lists.php.net to get a copy of this message
 ID:               27376
 Updated by:       derick@php.net
 Reported By:      rxk at gmx dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: win2000/Linux
 PHP Version:      4.3.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

Infinite recursion like this is always leaking. Don't you think your
example is pretty dumb anyway? :)


Previous Comments:
------------------------------------------------------------------------

[2004-02-24 08:03:41] rxk at gmx dot de

Description:
------------
unset don't free the memory.

Reproduce code:
---------------
<?php
set_time_limit(0);
$a=array();

for($j=0;$j<5;$j++) {
	for($i=0;$i<20000;$i++) {
	
		$a[$i] = array(1,2,3,4,5);
		$a[$i][] = &$a[$i];

	}
	echo "before unset\n";sleep(5);
	unset($a);
	echo "after unset\n";sleep(5);
}
?>

Actual result:
--------------
There is none differentiated before or after unset.
The memory overflows.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27376&edit=1


Thread (3 messages)

« previous php.bugs (#55447) next »