Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55083 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4104 invoked from network); 2 Sep 2011 12:25:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2011 12:25:40 -0000 Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:57136] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/60-00288-34BC06E4 for ; Fri, 02 Sep 2011 08:25:39 -0400 Received: by gyd5 with SMTP id 5so2151665gyd.29 for ; Fri, 02 Sep 2011 05:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=y2CM2fsAMoadjEgNwYsjB4Pxxtc2E/hP4KGnwzM7XRI=; b=SZDa9FX1zUAspRSA+F8Xio5Q3oGnIeHq3I6acJnCDbRGf4qIzpjJez+daPM3/vhNFa 04ZBkbpHAhQaPSdo0GSoFgpEVCpAF70EW6buz4x8iyRooqvjmCZ4U/aRpqavmZuSfriV giTdht6Jn6hfZzYdVsBqfBR3k++OGmPwzhaIY= Received: by 10.236.22.9 with SMTP id s9mr3339725yhs.129.1314966335116; Fri, 02 Sep 2011 05:25:35 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.236.43.131 with HTTP; Fri, 2 Sep 2011 05:25:15 -0700 (PDT) In-Reply-To: <4E412E3E.2@toolpark.com> References: <4E39E89F.8060605@sugarcrm.com> <4E3A3643.2070305@toolpark.com> <4E3A4793.2070209@sugarcrm.com> <4E3A91E8.1020107@toolpark.com> <4E3ACA42.8000001@sugarcrm.com> <4E3BF930.9030701@toolpark.com> <4E3C5EDE.3030401@toolpark.com> <4E3D073A.9050709@toolpark.com> <4E412E3E.2@toolpark.com> Date: Fri, 2 Sep 2011 14:25:15 +0200 X-Google-Sender-Auth: w4A3j6RfhhxKc9FbHkL3SMgnPKk Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=e89a8f642aee4bd6b604abf47578 Subject: Re: [PHP-DEV] [VOTE] Weak References From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --e89a8f642aee4bd6b604abf47578 Content-Type: text/plain; charset=ISO-8859-1 How about adding weak maps to this RFC? https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap This would be fantastic! Nicolas On Tue, Aug 9, 2011 at 14:55, Lars Schultz wrote: > Am 09.08.2011 14:22, schrieb Arvids Godjuks: > > I have mixed feelings about this proposal - from one point it's quite >> neat - ability to mark circular references for the memory manager so >> it can free them sounds very delicious, especially for some cases. I >> had run into my own bunch of problems with memory in PHP in the past >> and right now I'm running a daemon written in PHP in production on >> 5.3.6. Careful construction and knowledge that circular references >> actually do harm I did add safeguards that actually clean up the >> objects in recursive manner (and objects have internal flags that >> cleanup has been initiated - that way I make sure I cleanup the same >> object only once). That sort of planing at the design stage makes it >> far more friendly with memory, so it doesn't mean that PHP should have >> soft references. >> > > Exactly what I did;) > > > My opinion is that if this can be done without using significant >> resources and will not have major issues while implementing - it can >> be added, otherwise just skip it - better off fixing bugs and >> optimizing :) >> > > Of course. I am not saying that its a must have...just wanted to defend it > from being marked as useless. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8f642aee4bd6b604abf47578--