Re: RFC: Remove "destructor" from PEAR class
| From: | Lukas Smith | Date: | Wed, 16 Jun 2004 15:27:24 +0000 |
| Subject: | Re: RFC: Remove "destructor" from PEAR class | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30785@lists.php.net to get a copy of this message | ||
Alexey Borzov wrote:
Hi, Lukas Smith wrote:what i was saying is this: before PEAR stores a reference it could check if there is a destructor method defined in the given class (method_exits($foo, '_'.$foo)). regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07The problem is, the destructor method is *always* defined. It is defined in PEAR. That was the point of my entire message.as the "destructor". And when the constructor of the child class calls PEAR's constructor, it checks whether the class or any of the *parent* classes have a "destructor". Thus each class that extends PEAR, EVEN IF IT DOES NOT USE THE DESTRUCTOR FEATURE ITSELF, gets registered in PEAR's list of objects, preventing garbage collection. This creates a huge problem for long running scripts.shouldnt it be possible to just register the object if a destructor method is defined?