Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54418 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85147 invoked from network); 6 Aug 2011 08:33:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2011 08:33:31 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.20.132 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.20.132 c2bthomr14.btconnect.com Received: from [213.123.20.132] ([213.123.20.132:26578] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/43-57891-95CFC3E4 for ; Sat, 06 Aug 2011 04:33:30 -0400 Received: from [10.0.0.4] (host81-138-11-136.in-addr.btopenworld.com [81.138.11.136]) by c2bthomr14.btconnect.com (MOS 4.2.2-FCS) with ESMTP id DWF33172; Sat, 6 Aug 2011 09:33:24 +0100 X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0301.4E3CFC54.0070, actions=tag Message-ID: <4E3CFC53.1020206@lsces.co.uk> Date: Sat, 06 Aug 2011 09:33:23 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.19) Gecko/20110420 SUSE/2.0.14-2.2 SeaMonkey/2.0.14 MIME-Version: 1.0 To: PHP internals 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.8.6.73314:17:7.586, ip=81.138.11.136, rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __CT, __CT_TEXT_PLAIN, __CTE, __ANY_URI, __URI_NO_MAILTO, __CP_URI_IN_BODY, BODY_SIZE_1500_1599, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS X-Junkmail-Status: score=10/50, host=c2bthomr14.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B020A.4E3CFC56.012E,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] [VOTE] Weak References From: lester@lsces.co.uk (Lester Caine) Hannes Landeholm wrote: > - Weak references solves the loose coupled object indexing problem. "I need > this reference as long as it's referenced somewhere else." > - Soft references solves the caching problem. "I need this reference as long > as we have plenty of memory available." > - The GC solves the cyclic reference problem (since 5.3). Personally I think I need to get my head around just how these cyclic references come about? I've always viewed my own data structure as 'linear', and while I monitor for memory leaks, it's not something I have seen for many years. I tend to create just the objects I need, or reuse a single object several times reloading the latest data, so nievely assume that when I unset them the space is freed. So I'm more interested in hitting the memory limit because I've got too much open rather than trying to work out if there is something I can throw away short term. I'll pull a list from the database with the key data, and only access the full object IF I need some fine detail. Anything that becomes more 'interesting' gets added to the list. This probably comes about from my time designing code sing chip micro's ... the whole application fits in 1024 works of memory so one gets creative :) -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php