Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38628 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35180 invoked from network); 26 Jun 2008 08:07:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2008 08:07:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:50991] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/43-13482-F2E43684 for ; Thu, 26 Jun 2008 04:07:12 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 7AF961EBC017; Thu, 26 Jun 2008 08:09:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i5yP2XtYS4zE; Thu, 26 Jun 2008 10:09:46 +0200 (CEST) Received: from [10.207.131.109] (unknown [194.230.154.132]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id EAB351EBC014; Thu, 26 Jun 2008 10:09:45 +0200 (CEST) Cc: Andi Gutmans , php-dev List Message-ID: To: Christian Seiler In-Reply-To: <4858FCC7.5030305@gmx.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Date: Thu, 26 Jun 2008 10:06:19 +0200 References: <4856A547.3080801@gmx.net> <698DE66518E7CA45812BD18E807866CE01B11811@us-ex1.zend.net> <4858FCC7.5030305@gmx.net> X-Mailer: Apple Mail (2.924) Subject: Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP From: mls@pooteeweet.org (Lukas Kahwe Smith) On 18.06.2008, at 14:17, Christian Seiler wrote: > Now, upon execution of the code containing the closure, the new opcode > just copies the zend_function structure into a copy, registers that > copy > as a resource and returns that resource. As soon as the resource is > garbage collected (or explicitly unset), the op_array copy is > destroyed. > No modification of the actual class is done at all - the cache remains > happy. So since a reference is stored, it means that the destructor of the enclosing object is only called once not only the variable holding the object, but also all lambda functions that were created inside of the class have been free'ed? regards, Lukas Kahwe Smith mls@pooteeweet.org