Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55149 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79699 invoked from network); 3 Sep 2011 11:56:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2011 11:56:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:45709] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/C4-45280-ED5126E4 for ; Sat, 03 Sep 2011 07:56:15 -0400 Received: by bkas6 with SMTP id s6so2944771bka.29 for ; Sat, 03 Sep 2011 04:56:11 -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:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=BT4OnfDCFJIdWsUOGK+KLuQT+QlSiSVIpWNEJOEue7U=; b=H3O+IR9JLg+qDueZ04sZFFe8LQ9v30BpgjXLhnAJYJfWmBnovvnpksG2QSqfywRJoy 5zM4N8tVbXkJT8cQRyivY1MDPtUB9K/tUX10HWpiyAj8XI2tRzy1EN/GOr5UvFcIn87i I9LXYnu0atLL9qKLmRTlCsn70ESNqXAcrhjgQ= MIME-Version: 1.0 Received: by 10.204.153.6 with SMTP id i6mr1126661bkw.90.1315050971655; Sat, 03 Sep 2011 04:56:11 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.40.199 with HTTP; Sat, 3 Sep 2011 04:56:11 -0700 (PDT) In-Reply-To: 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: Sat, 3 Sep 2011 13:56:11 +0200 X-Google-Sender-Auth: g1uXGzfphZ4W4NdJPJ35K1Zcu9M Message-ID: To: Nicolas Grekas Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0015175cd5f206ecf204ac082a76 Subject: Re: [PHP-DEV] [VOTE] Weak References From: colder@php.net (Etienne Kneuss) --0015175cd5f206ecf204ac082a76 Content-Type: text/plain; charset=UTF-8 Hi, On Fri, Sep 2, 2011 at 14:25, Nicolas Grekas wrote: > How about adding weak maps to this RFC? > > > https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap > > This would be fantastic! > > Nicolas > Indeed, I planned to implement that as well, I haven't had the time to do it yet though. It should happen in the following weeks. Best, > > 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 > > > > > -- Etienne Kneuss http://www.colder.ch --0015175cd5f206ecf204ac082a76--