mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
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...
This commit is contained in:
parent
a2e1844de9
commit
7c710a9f9b
4 changed files with 5 additions and 5 deletions
|
@ -70,7 +70,7 @@ void php_free_stmt_bind_buffer(BIND_BUFFER bbuf, int type)
|
|||
}
|
||||
}
|
||||
if (bbuf.vars[i]) {
|
||||
ZVAL_DELREF(bbuf.vars[i]);
|
||||
zval_ptr_dtor(&bbuf.vars[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue