Re: Re: Compatibility problems with PHP 5
| From: | Marcus Boerger | Date: | Thu, 27 Nov 2003 15:23:32 +0000 |
| Subject: | Re: Re: Compatibility problems with PHP 5 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-5775@lists.php.net to get a copy of this message | ||
Hello Stanislav,
Thursday, November 27, 2003, 3:32:25 PM, you wrote:
MB>>> It respects the refcoutning while destructing the zvals.
> I don't exacetly understand _how_ it respects them so that this solves the
> circular dependency problem. In fact, in the patch in the URL you have
> sent I don't even see one call to destructor. Also, does you patch take
> into account the fact that a number of zvals can refer to the same object?
When a zval is an object and it gets freed the destructor is called.
MB>>> Controlling life time of objects and hence you could also control
MB>>> lifetime of resources if you use php5 new database systems which use
MB>>> objects natively or if you use wrapper objects. So with destructors
MB>>> you can free them as soon as possible (automagically) without any
MB>>> further time consumpting tests. So you will also get lower memory
> I don't see how you can do that. Only place when you don't have to call
> dtor manually and can be sure the object is destroyed is the end of the
> request. But by the end of the request all resources are freed anyway, so
> you don't need dtors to free them.
Well i can test my scripts - and i do understand refcounting and php. So at
least an expirienced programmer can take advantage.
--
Best regards,
Marcus mailto:helly@php.net