Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27543 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95334 invoked by uid 1010); 19 Jan 2007 20:03:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95318 invoked from network); 19 Jan 2007 20:03:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2007 20:03:15 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:31377] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/84-60570-00421B54 for ; Fri, 19 Jan 2007 15:03:14 -0500 Received: (qmail 8441 invoked from network); 19 Jan 2007 20:01:31 -0000 Received: from office.zend.office (HELO ?127.0.0.1?) (192.168.16.109) by internal.zend.office with SMTP; 19 Jan 2007 20:01:31 -0000 Message-ID: <45B123F5.3070803@zend.com> Date: Fri, 19 Jan 2007 12:03:01 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0b1 (Windows/20061206) MIME-Version: 1.0 To: Lars Schultz CC: internals@lists.php.net References: <45B0E1EE.2030102@widescreen.ch> In-Reply-To: <45B0E1EE.2030102@widescreen.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP Object-Caching and Reference Counting From: stas@zend.com (Stanislav Malyshev) > As you can see I boldly used the function reference_count(Object) even > though it doesn't exist. This is exactly what I'd need to allow my > concept to work. I keep thinking of any other solutions, but up until > now, I didn't find any better solution for this problem. Of course I can Note that the engine does not guarantee you any particular value of the refcount. Passing parameters around, accessing variables, etc. may change the refcount. One thing the engine guarantees you is that once no links to the variable exist it would be destroyed (which may not happen immediately after you do unset, for example, but probably would happen "soon"). So actually figuring out if the object is referenced by any other place could prove non-trivial, depending on the application structure. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/