Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53972 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29222 invoked from network); 15 Jul 2011 17:23:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2011 17:23:17 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.173 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.215.173 mail-ey0-f173.google.com Received: from [209.85.215.173] ([209.85.215.173:48948] helo=mail-ey0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/F0-17341-387702E4 for ; Fri, 15 Jul 2011 13:23:16 -0400 Received: by eyb7 with SMTP id 7so286552eyb.18 for ; Fri, 15 Jul 2011 10:23: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 :content-transfer-encoding; bh=Gad7rzLSYrYCU2Cn3YrxvNt7KjgbJ+hNSHLlRq/JsJo=; b=YFYlxmRvv8J7tVMixICb37VI5u9+kcEJTivyiNVjJTPK31uDwAb4V6GnxxQ5FHAebX c2CSt+dfpNIqlWck/Z9yYul5v0TEe8gpwnswDf1lKZnsmoiMsPuzKvFL1tlPoiXr4Xwa 2hwhUAJF1buPEI52ITrXbjotG3OeJaJ6+2lmk= MIME-Version: 1.0 Received: by 10.204.83.138 with SMTP id f10mr1298882bkl.289.1310750591767; Fri, 15 Jul 2011 10:23:11 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.140.92 with HTTP; Fri, 15 Jul 2011 10:23:11 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Jul 2011 19:23:11 +0200 X-Google-Sender-Auth: SO4xAkq3MTruMWyymBGt1VeJBPU Message-ID: To: Ferenc Kovacs Cc: PHP Internals , Hannes Landeholm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] weak references From: colder@php.net (Etienne Kneuss) Hi, On Thu, Jul 14, 2011 at 21:42, Ferenc Kovacs wrote: > To spare the "5.4 features vote" thread from the off-topic discussion, > we can continue here. > Hannes Landeholm brought this idea up, see > http://news.php.net/php.internals/53956 and > http://news.php.net/php.internals/53959 > I would suggest that Hannes create an rfc, and add some examples and > introduce the weak references in general and how this can be useful, > what problems do they solve (it was discussed in the bugreport, but it > wasn't clear as far as I can tell from the comments). > if I understand this right, Hannes proposed adding a new Spl > class(interface?), which can store and retrive a collection of > variables without incrementing the refcounts, so they can be freed if > they aren't used other than in this collection. > > Hannes please correct me if I'm wrong somewhere. > Some draft here: https://wiki.php.net/rfc/weakreferences With a patch implementing some magic for a POC here http://patches.colder.ch/php-src/weakref-trunk.patch?markup. It still requires some work though. > -- > Ferenc Kov=C3=A1cs > @Tyr43l - http://tyrael.hu > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Etienne Kneuss http://www.colder.ch