Re: Destructor Order
| From: | Arvids Godjuks | Date: | Thu, 23 Oct 2008 12:27:09 +0000 |
| Subject: | Re: Destructor Order | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41344@lists.php.net to get a copy of this message | ||
I think this should be implemented by user. If you are full OOP in your
application, then just register all your objects in some global object (In
my case I have a global singelton) and trigger hiv removal at the end of
your application. If you have destructors written in every object - they
will be destroied by chain correctly. Yes, this is design featchure, but a
good one, because if you will move beyound PHP you will have to learn how to
do it anyway sooner or laiter :)
User knows the best how his objects should be destroied. PHP is slow
enougth, any special functionality will make it more slow. Let's let
developers do the optimization work for a while, may be they will find a way
how to significantly boost PHP speed :)