Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14824 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1879 invoked by uid 1010); 11 Feb 2005 15:36:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1733 invoked from network); 11 Feb 2005 15:36:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2005 15:36:44 -0000 X-Host-Fingerprint: 62.99.200.227 62-99-200-227.sdsl-line.inode.at Windows 2000 SP4, XP SP1 Received: from ([62.99.200.227:19760] helo=tsign-srv.t-sign.com) by pb1.pair.com (ecelerity 1.2.11 (r4403)) with SMTP id F0/10-29971-DE0DC024 for ; Fri, 11 Feb 2005 10:36:14 -0500 Received: from [192.168.100.138] ([192.168.100.138] unverified) by tsign-srv.t-sign.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 11 Feb 2005 08:21:15 +0100 Message-ID: <420C5DDF.8080504@fischer.name> Date: Fri, 11 Feb 2005 08:25:19 +0100 User-Agent: Mozilla Thunderbird 1.0RC1 (Windows/20041201) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net References: <200502100959.j1A9xiru020457@post.webmailer.de> <20050210103042.57056.qmail@lists.php.net> <420B7DAB.4050207@caedmon.net> <20050210183700.17169.qmail@lists.php.net> In-Reply-To: <20050210183700.17169.qmail@lists.php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Feb 2005 07:21:15.0631 (UTC) FILETIME=[45C6EFF0:01C5100A] Subject: Re: [PHP-DEV] Re: How to unload a class From: markus@fischer.name (Markus Fischer) Sara Golemon wrote: >>>What would happen to the instanciated objects? >> >>Only allowing class unloading for classes that have no instantiated >>objects would be an option. >> > > And how would you know if it'd been instantiated? Even if you recursively > looped through every variable hash from EG(symbol_table) on down, there'd > still be the possibility that one or two objects would be hiding in a > resource somewhere (i.e. php_stream_context). Is there a technical limitation to loop through every internal hash which could possible hold an instantiated object? If there would exist functions like - class_has_instanciated_objects() - class_get_instanciated_objects() I guess noone would expect them to be quick or fast. Of course there's the fact to respect the class hierarchy which adds complexity. I can imagine that optimizers and such would have problems with it. But albeit, technically? - Markus