Re: Waste Management
| From: | herrwitten@php.net | Date: | Thu, 07 Jul 2005 02:23:46 +0000 |
| Subject: | Re: Waste Management | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-2555@lists.php.net to get a copy of this message | ||
When I use zval_copy_ctor on an object, it would seem a refcount is updated, but not the one that matters:
EG(objects_store).object_buckets[handle].bucket.obj.refcount++;
In fact, my code doesn't work when I use zval_copy_ctor.
The problem is fixed simply by use
ZVAL_ADDREF
but that seems distrustful for future compatibility.
I need a list of rules for when and where I should copy, addrefs and deallocate.
Thank you.