When you run:
<?
$a=array();
$b[]=&$a;
$a[]=&$b;
?>
You will get warnings about memory leaks. I know that it is ugly code
etc. but shouldn't it be solved by ZE? It should free such things properly.
I know that in this simple case whole memory is freed, but if we add
resource to $a table, resource desctructor won't be called because
of reference - that's why PHP leeks memory. Am I right?
regards,
Wojtek
When you run:
<?
$a=array();
$b[]=&$a;
$a[]=&$b;
?>
I'm also interested in it but I didn't see the warning on my platform
running your example.
Wei He
At 19:32 22.05.2003, Wojtek Meler wrote:
When you run:
<?
$a=array();
$b[]=&$a;
$a[]=&$b;
?>You will get warnings about memory leaks. I know that it is ugly code etc.
but shouldn't it be solved by ZE? It should free such things properly.
I know that in this simple case whole memory is freed, but if we add
resource to $a table, resource desctructor won't be called because
of reference - that's why PHP leeks memory. Am I right?
Putting out the warning is better.
Eventually a damn note that the user shoot his self in the knee.
But that would slow down performance.
AND a side note: even java does not handle that.
regards
marcus