Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7992 invoked from network); 5 Aug 2011 17:46:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2011 17:46:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=jezz.g@officechristmas.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jezz.g@officechristmas.co.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain officechristmas.co.uk designates 188.39.46.83 as permitted sender) X-PHP-List-Original-Sender: jezz.g@officechristmas.co.uk X-Host-Fingerprint: 188.39.46.83 mail.eclipsehq.co.uk Received: from [188.39.46.83] ([188.39.46.83:11037] helo=mail.eclipsehq.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/10-06067-98C2C3E4 for ; Fri, 05 Aug 2011 13:46:50 -0400 Received: from [188.220.21.188] (helo=[192.168.1.66]) by mail.eclipsehq.co.uk with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.74 (FreeBSD)) (envelope-from ) id 1QpOUP-000M1M-MW for internals@lists.php.net; Fri, 05 Aug 2011 17:47:19 +0000 Message-ID: <4E3C2C8F.7050700@officechristmas.co.uk> Date: Fri, 05 Aug 2011 18:46:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 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 X-Spam-Score: -2.9 X-SA-Exim-Connect-IP: 188.220.21.188 X-SA-Exim-Mail-From: jezz.g@officechristmas.co.uk X-SA-Exim-Scanned: No (on mail.eclipsehq.co.uk); SAEximRunCond expanded to false X-Authenticated-Sender: jezz.g X-Complaints: abuse@eclipsehq.co.uk X-Abuse: abuse@eclipsehq.co.uk (Please include full headers in abuse reports) Subject: Re: [PHP-DEV] [VOTE] Weak References From: jezz.g@officechristmas.co.uk (Jezz Goodwin) It sounds to me that weak/soft references are only really half a solution to a problem. As Chris Stockton points out http://news.php.net/php.internals/54391 there is always going to be additional code that has to check to see if the reference is still valid. If the only concern here is running out of memory, surely you could design a framework that could reduce it's memory usage without having to get rid of it's objects. For example, your ORM objects will have a store of data. You could run a process every now and again that deletes the data from the objects (everything except the ID of the table). And then write it in to the framework so that if you start using the object again it goes and gets it's data back?