mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Step 4:
Move to a 7-bit counter (not fully implemented yet)
This commit is contained in:
parent
6ec1acbe32
commit
2a6da7814c
11 changed files with 151 additions and 133 deletions
|
@ -61,17 +61,23 @@ ZEND_API int zval_dtor(zval *zvalue)
|
|||
ELS_FETCH();
|
||||
|
||||
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
|
||||
#ifdef USE_AI_COUNT
|
||||
if (EG(AiCount)==0) {
|
||||
zend_hash_destroy(zvalue->value.ht);
|
||||
efree(zvalue->value.ht);
|
||||
} else {
|
||||
zend_ptr_stack_push(&EG(garbage), zvalue->value.ht);
|
||||
}
|
||||
#else
|
||||
zend_hash_destroy(zvalue->value.ht);
|
||||
efree(zvalue->value.ht);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IS_OBJECT: {
|
||||
ELS_FETCH();
|
||||
#ifdef USE_AI_COUNT
|
||||
ELS_FETCH();
|
||||
|
||||
if (EG(AiCount)==0) {
|
||||
zend_hash_destroy(zvalue->value.obj.properties);
|
||||
|
@ -79,6 +85,10 @@ ZEND_API int zval_dtor(zval *zvalue)
|
|||
} else {
|
||||
zend_ptr_stack_push(&EG(garbage), zvalue->value.obj.properties);
|
||||
}
|
||||
#else
|
||||
zend_hash_destroy(zvalue->value.obj.properties);
|
||||
efree(zvalue->value.obj.properties);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue