diff options
author | Zeev Suraski <zeev@php.net> | 2004-02-15 12:58:19 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2004-02-15 12:58:19 +0000 |
commit | 7c710a9f9bb65f90d35bdb88d2bc70df1f03b81c (patch) | |
tree | fd700bd09f894c07b111c8b7f50c8d6f59da1ef8 /ext/com_dotnet/com_saproxy.c | |
parent | a2e1844de9d2584769fbd4a06e7b67e418919198 (diff) | |
download | php-git-7c710a9f9bb65f90d35bdb88d2bc70df1f03b81c.tar.gz |
Use zval_ptr_dtor() to free variables as soon as they hit refcount of 0.
Note: You should not be using ZVAL_DELREF() in day to day usage. Instead,
you should use zval_ptr_dtor(). Use ZVAL_DELREF() only if you're
messing with the refcount directly and know what you're doing.
Note #2: For clarity, if you want to initialize a new zval with a refcount
of 0, it's best to do that directly, instead of using ZVAL_DELREF
after allocating the zval...
Diffstat (limited to 'ext/com_dotnet/com_saproxy.c')
-rw-r--r-- | ext/com_dotnet/com_saproxy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index 2dbde1415d..78e9f622ed 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -265,7 +265,7 @@ static void saproxy_free_storage(void *object TSRMLS_DC) { php_com_saproxy *proxy = (php_com_saproxy *)object; - ZVAL_DELREF(proxy->zobj); + zval_ptr_dtor(&proxy->zobj); efree(proxy->indices); efree(proxy); } @@ -325,7 +325,7 @@ static void saproxy_iter_dtor(zend_object_iterator *iter TSRMLS_DC) { php_com_saproxy_iter *I = (php_com_saproxy_iter*)iter->data; - ZVAL_DELREF(I->proxy_obj); + zval_ptr_dtor(&I->proxy_obj); efree(I->indices); efree(I); |