Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7585 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94119 invoked by uid 1010); 4 Feb 2004 21:46:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 94013 invoked from network); 4 Feb 2004 21:46:30 -0000 Received: from unknown (HELO mrout2.yahoo.com) (216.145.54.172) by pb1.pair.com with SMTP; 4 Feb 2004 21:46:30 -0000 Received: from bourbon.corp.yahoo.com (bourbon.corp.yahoo.com [216.145.53.135]) by mrout2.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i14LjHfH045887; Wed, 4 Feb 2004 13:45:17 -0800 (PST) Received: (from andrei@localhost) by bourbon.corp.yahoo.com (8.12.9/8.11.1) id i14LjH4O040521; Wed, 4 Feb 2004 13:45:17 -0800 (PST) (envelope-from andrei@gravitonic.com) X-Authentication-Warning: bourbon.corp.yahoo.com: andrei set sender to andrei@gravitonic.com using -f Date: Wed, 4 Feb 2004 13:45:17 -0800 To: zeev@zend.com Cc: internals@lists.php.net Message-ID: <20040204214517.GC40381@gravitonic.com> References: <5.1.0.14.2.20040204115844.04341008@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20040204115844.04341008@localhost> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] New destructors implementation From: andrei@gravitonic.com (Andrei Zmievski) On Wed, 04 Feb 2004, Andi Gutmans wrote: > 3. The APIs have changed to allow for this new mechanism. Instead of the > previous dtor callback, which was supposed to both call the destructor and > free the object's storage, there are now two separate callbacks - dtor > (call the destructor) and free_storage (guess). Generally, for classes > which implement PHP-style objects, you should implement both of these > callbacks (though you can probably use the standard dtor callback). For > overloaded classes such as SimpleXML, COM, etc. - you will most likely only > have to implement the free_storage callback, as there's no destructor > per-se. We already went over all the overloaded classes in the php-src CVS > and moved most of the dtor callbacks to free_storage. Note that the > interface is slightly different between these two callbacks - free_storage > doesn't receive the object handle. Is there an automatic call to __destruct() method then? Because I'd like my PHP-GTK objects to have that method called upon destruction and I don't feel like reimplementing the mechanism for doing that. - Andrei