circular references

From: Date: Thu, 22 May 2003 17:32:40 +0000
Subject: circular references
Groups: php.internals 
Request: Send a blank email to internals+get-1898@lists.php.net to get a copy of this message
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

« previous php.internals (#1898) next »