Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6754 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40618 invoked by uid 1010); 3 Jan 2004 01:00:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40593 invoked from network); 3 Jan 2004 01:00:54 -0000 Received: from unknown (HELO mrout1.yahoo.com) (216.145.54.171) by pb1.pair.com with SMTP; 3 Jan 2004 01:00:54 -0000 Received: from bourbon.corp.yahoo.com (bourbon.corp.yahoo.com [216.145.53.135]) by mrout1.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i0310XIj077479 for ; Fri, 2 Jan 2004 17:00:33 -0800 (PST) Received: (from andrei@localhost) by bourbon.corp.yahoo.com (8.12.9/8.11.1) id i0310X1s004266 for internals@lists.php.net; Fri, 2 Jan 2004 17:00:33 -0800 (PST) (envelope-from andrei) Date: Fri, 2 Jan 2004 17:00:33 -0800 To: internals@lists.php.net Message-ID: <20040103010033.GA4245@gravitonic.com> References: <20040103000120.GA23760@csh.rit.edu> <20040103000921.GA3712@gravitonic.com> <20040103002841.GB23760@csh.rit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040103002841.GB23760@csh.rit.edu> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] Custom object creation and reference counts From: andrei@gravitonic.com (Andrei Zmievski) On Fri, 02 Jan 2004, Jon Parise wrote: > It appears to be a side-effect of not defining the 'scope' field in > the zend_internal_function call that is invokved from my custom > 'constructor_get' handler. If the 'scope' field is NULL, my object > is treated as a reference. If I assign my class entry to the 'scope' > field, the object is "normal" (i.e. not a reference). Hmm, can I see the code? > > zval_dtor() will. It calls del_ref on the underlying object. > > I see. I would have to call zval_dtor() myself in any of the cases > where I knowingly created an additional reference. That makes sense. Ditto. :) - Andrei