}
}
+/* For regular arrays (non-persistent, storing zvals). */
static zend_always_inline void zend_array_release(zend_array *array)
{
if (!(GC_FLAGS(array) & IS_ARRAY_IMMUTABLE)) {
}
}
+/* For general hashes (possibly persistent, storing any kind of value). */
+static zend_always_inline void zend_hash_release(zend_array *array)
+{
+ if (!(GC_FLAGS(array) & IS_ARRAY_IMMUTABLE)) {
+ if (GC_DELREF(array) == 0) {
+ zend_hash_destroy(array);
+ pefree(array, GC_FLAGS(array) & IS_ARRAY_PERSISTENT);
+ }
+ }
+}
+
END_EXTERN_C()
#define ZEND_INIT_SYMTABLE(ht) \
zend_string_release_ex(prop_info->doc_comment, 0);
}
if (prop_info->attributes) {
- zend_array_release(prop_info->attributes);
+ zend_hash_release(prop_info->attributes);
}
zend_type_release(prop_info->type, /* persistent */ 0);
}
zend_string_release_ex(c->doc_comment, 0);
}
if (c->attributes) {
- zend_array_release(c->attributes);
+ zend_hash_release(c->attributes);
}
}
} ZEND_HASH_FOREACH_END();
zend_string_release_ex(ce->info.user.doc_comment, 0);
}
if (ce->attributes) {
- zend_array_release(ce->attributes);
+ zend_hash_release(ce->attributes);
}
if (ce->num_traits > 0) {
zend_string_release_ex(c->doc_comment, 1);
}
if (c->attributes) {
- zend_array_release(c->attributes);
+ zend_hash_release(c->attributes);
}
}
free(c);
if (ce->properties_info_table) {
free(ce->properties_info_table);
}
+ if (ce->attributes) {
+ zend_hash_release(ce->attributes);
+ }
free(ce);
break;
}
zend_string_release_ex(op_array->doc_comment, 0);
}
if (op_array->attributes) {
- zend_array_release(op_array->attributes);
+ zend_hash_release(op_array->attributes);
}
if (op_array->live_range) {
efree(op_array->live_range);