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...
{
php_com_saproxy *proxy = (php_com_saproxy *)object;
- ZVAL_DELREF(proxy->zobj);
+ zval_ptr_dtor(&proxy->zobj);
efree(proxy->indices);
efree(proxy);
}
{
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);
return;
}
if (LIBXML(stream_context)) {
- ZVAL_DELREF(LIBXML(stream_context));
+ zval_ptr_dtor(&LIBXML(stream_context));
LIBXML(stream_context) = NULL;
}
ZVAL_ADDREF(arg);
}
}
if (bbuf.vars[i]) {
- ZVAL_DELREF(bbuf.vars[i]);
+ zval_ptr_dtor(&bbuf.vars[i]);
}
}
zval *empty_var;
ALLOC_INIT_ZVAL(empty_var); /* this sets refcount to 1 */
- ZVAL_DELREF(empty_var); /* our module does not maintain a ref */
+ empty_var->refcount = 0; /* our module does not maintain a ref */
/* The next call will increase refcount by NR_OF_SYM_TABLES==2 */
zend_set_hash_symbol(empty_var, name, namelen, 1, 2, Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
} else if (sym_global == NULL) {