Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1899 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49488 invoked from network); 22 May 2003 18:04:11 -0000 Received: from unknown (HELO mailout11.sul.t-online.com) (194.25.134.85) by pb1.pair.com with SMTP; 22 May 2003 18:04:11 -0000 Received: from fwd07.sul.t-online.de by mailout11.sul.t-online.com with smtp id 19IuQC-0007ER-08; Thu, 22 May 2003 20:04:08 +0200 Received: from baumbart.post.rwth-aachen.de (520072483730-0001@[80.142.164.108]) by fwd07.sul.t-online.com with esmtp id 19IuPs-0aLkqOC; Thu, 22 May 2003 20:03:48 +0200 Reply-to:marcus.boerger@post.rwth-aachen.de Message-ID: <5.1.0.14.2.20030522200238.02e56e38@pop.t-online.de> X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 22 May 2003 20:03:46 +0200 To: Wojtek Meler Cc: internals@lists.php.net In-Reply-To: <3ECD09B8.7020305@wp-sa.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Sender: 520072483730-0001@t-dialin.net Subject: Re: [PHP-DEV] circular references From: marcus.boerger@t-online.de ((Marcus =?iso-8859-1?Q?B=F6rger?=)) References: <3ECD09B8.7020305@wp-sa.pl> 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