Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27563 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84049 invoked by uid 1010); 21 Jan 2007 16:21:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 84021 invoked from network); 21 Jan 2007 16:21:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jan 2007 16:21:12 -0000 Authentication-Results: pb1.pair.com header.from=schultz@widescreen.ch; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=schultz@widescreen.ch; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain widescreen.ch from 62.2.95.247 cause and error) X-PHP-List-Original-Sender: schultz@widescreen.ch X-Host-Fingerprint: 62.2.95.247 mxout.hispeed.ch Linux 2.4/2.6 Received: from [62.2.95.247] ([62.2.95.247:59137] helo=smtp.hispeed.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/7B-33373-4F293B54 for ; Sun, 21 Jan 2007 11:21:11 -0500 Received: from [127.0.0.1] (84-72-85-223.dclient.hispeed.ch [84.72.85.223]) (authenticated bits=0) by smtp.hispeed.ch (8.12.11.20060308/8.12.11/taifun-1.0) with ESMTP id l0LGL4Zk002269 for ; Sun, 21 Jan 2007 17:21:05 +0100 Message-ID: <45B392F3.1030806@widescreen.ch> Date: Sun, 21 Jan 2007 17:21:07 +0100 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0704-0, 18.01.2007), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on smtp-02.tornado.cablecom.ch X-Virus-Status: Clean X-DCC-spamcheck-01.tornado.cablecom.ch-Metrics: smtp-02.tornado.cablecom.ch 1377; Body=1 Fuz1=1 Fuz2=1 Subject: Re: [PHP-DEV] PHP Object-Caching and Reference Counting From: schultz@widescreen.ch (Lars Schultz) > 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. I don't understand the problem really, because I am aware that even a parameter counts as a reference (why not?)...it wouldn't matter in my case because I am in total control of the last two references...so if there are more, I keep it. Tracking the references manually is not really an option because it's such a large project. I don't understand the part about the engine not guaranteeing the destruction immediately. Because as soon as the ref-count decreases to zero it can be removed from memory...it's different in java and other languages which don't use ref-count but more complex algorithms like mark-and-sweep and such, they only are run once in a while and may not be triggered manually...so, I'd understand it in that case.