Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26891 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71432 invoked by uid 1010); 10 Dec 2006 23:04:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71417 invoked from network); 10 Dec 2006 23:04:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2006 23:04:26 -0000 X-Host-Fingerprint: 82.131.15.64 ip64.cab15.ktln.starman.ee Received: from [82.131.15.64] ([82.131.15.64:3524] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/04-00543-7529C754 for ; Sun, 10 Dec 2006 18:04:26 -0500 Message-ID: <4A.04.00543.7529C754@pb1.pair.com> To: internals@lists.php.net Date: Mon, 11 Dec 2006 01:02:53 +0200 User-Agent: Thunderbird 2.0a1 (Windows/20060724) MIME-Version: 1.0 References: <457C330C.5050506@php.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.131.15.64 Subject: Re: [PHP-DEV] Re: [RFC] Magic Method that handles unset($object) From: ants.aasma@gmail.com (Ants Aasma) Sebastian Bergmann wrote: > Sara Golemon wrote: >> To do this >right< you'd need notification, not just that unset() was >> called on the object, but what the current state of *both* of its >> relevant reference counts are. > > I fail to see why. If we introduce a method that is called for > unset() then there should be no problem with resetting the > $children attribute to array() in my example: In what way is this different from defining method close() and instead of unset($object) call $object->close()? What happens if you have more than one non-child reference to parent? -- Ants Aasma