Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54331 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63998 invoked from network); 4 Aug 2011 00:32:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2011 00:32:37 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.153 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.153 smtp153.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.153] ([207.97.245.153:47905] helo=smtp153.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/60-60059-3A8E93E4 for ; Wed, 03 Aug 2011 20:32:35 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp25.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 0A9A630049C; Wed, 3 Aug 2011 20:32:33 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp25.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 85A383003FC; Wed, 3 Aug 2011 20:32:32 -0400 (EDT) Message-ID: <4E39E89F.8060605@sugarcrm.com> Date: Wed, 03 Aug 2011 17:32:31 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Jan Dolecek CC: "internals@lists.php.net" References: <4E3898B0.40809@sugarcrm.com> <4E38EC0C.9080304@lerdorf.com> <4E38FA2E.4030605@lsces.co.uk> <4E38FC67.9090200@toolpark.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Weak References From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! On 8/3/11 12:22 PM, Jan Dolecek wrote: > Thanks Etienne, > > I was waiting for this for a while! I wrote a blog post how to get > best benefits from weak references: > http://blog.juzna.cz/2011/08/weak-references-in-php/ > Perhaps this will help showing people what are they good for. > I'm not sure I understand why you need week refs there - can't you just always use $prodDb->getProduct(1) and when you don't need it anymore just do $prodDb->drop(1)? Or let it drop it whenever it wants to? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227