Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54309 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65720 invoked from network); 3 Aug 2011 07:44:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2011 07:44:47 -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:59131] helo=mail1.screenlight.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/32-46920-D6CF83E4 for ; Wed, 03 Aug 2011 03:44:46 -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; Wed, 3 Aug 2011 09:44:41 +0200 Message-ID: <4E38FC67.9090200@toolpark.com> Date: Wed, 03 Aug 2011 09:44:39 +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: <4E3898B0.40809@sugarcrm.com> <4E38EC0C.9080304@lerdorf.com> <4E38FA2E.4030605@lsces.co.uk> In-Reply-To: <4E38FA2E.4030605@lsces.co.uk> 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 03.08.2011 09:35, schrieb Lester Caine: > I think this is were I am sitting at the moment ... If a script needs to > tidy up memory because something has gone wrong, then in my book the > script is faulty? The example of why it is needed does not make sense to > me, probably because I don't understand it, firing an action on the > database end and trying to then simply tidy up the the php end cache > without a clean reload just seems wrong? How do you know what the stored > procedure/trigger/business logic has done to the underlying data? But > I've never used MySQL :) > I think you might have misunderstood the use case Hannes mentioned. It is a valid problem and weak references are a neat and indeed the only clean solution (so far) to it. I ran into similar Problems and it costs a lot of code and bugfixing to work around the problem, both with the observer-pattern and object-mapper-cache. Do not ridicule his strategy just because you've never run into the problem.