Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54412 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30326 invoked from network); 5 Aug 2011 21:21:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2011 21:21:43 -0000 Authentication-Results: pb1.pair.com header.from=lars.schultz@toolpark.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lars.schultz@toolpark.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain toolpark.com from 195.49.42.12 cause and error) X-PHP-List-Original-Sender: lars.schultz@toolpark.com X-Host-Fingerprint: 195.49.42.12 mail1.screenlight.ch Received: from [195.49.42.12] ([195.49.42.12:50945] helo=mail1.screenlight.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/92-10106-5EE5C3E4 for ; Fri, 05 Aug 2011 17:21:42 -0400 Received: from [192.168.1.52] ([217.162.146.137]) (authenticated user lars.schultz@toolpark.com) by mail1.screenlight.ch (Kerio Connect 7.0.2 patch 1) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for internals@lists.php.net; Fri, 5 Aug 2011 23:21:36 +0200 Message-ID: <4E3C5EDE.3030401@toolpark.com> Date: Fri, 05 Aug 2011 23:21:34 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: internals@lists.php.net References: <4E38EC0C.9080304@lerdorf.com> <4E38FA2E.4030605@lsces.co.uk> <4E38FC67.9090200@toolpark.com> <4E39E89F.8060605@sugarcrm.com> <4E3A3643.2070305@toolpark.com> <4E3A4793.2070209@sugarcrm.com> <4E3A91E8.1020107@toolpark.com> <4E3ACA42.8000001@sugarcrm.com> <4E3BF930.9030701@toolpark.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Weak References From: lars.schultz@toolpark.com (Lars Schultz) Am 05.08.2011 18:29, schrieb Hannes Landeholm: > It's interesting to think about though. I'd definitely find a use for them;) I might just patch our installations to provide me with the zval-refcount and go with that for now...I have been warned, but I have to burn myself before I believe that boiling water is hot;) I just thought of another design-pattern which could make use of WeakReferences...The composite design pattern. http://en.wikipedia.org/wiki/Composite_pattern A parent references its childs and each child references its parent. circular-reference nightmare...with WeakReferences I could use a weakReference for storing the parent...so that if the parents last real reference is discarded the childs will cleaned out as well.