Re: circular references
| From: | (Marcus Börger) | Date: | Thu, 22 May 2003 18:03:46 +0000 |
| Subject: | Re: circular references | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1899@lists.php.net to get a copy of this message | ||
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