diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 6e7d31e15a40f..faf0ad1a685d1 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -293,7 +293,6 @@ ZEND_API void destroy_zend_class(zval *zv) { zend_property_info *prop_info; zend_class_entry *ce = Z_PTR_P(zv); - zend_function *fn; if (ce->ce_flags & ZEND_ACC_IMMUTABLE) { return; @@ -473,20 +472,6 @@ ZEND_API void destroy_zend_class(zval *zv) zend_hash_destroy(&ce->properties_info); zend_string_release_ex(ce->name, 1); - /* TODO: eliminate this loop for classes without functions with arg_info / attributes */ - ZEND_HASH_MAP_FOREACH_PTR(&ce->function_table, fn) { - if (fn->common.scope == ce) { - if (fn->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS)) { - zend_free_internal_arg_info(&fn->internal_function); - } - - if (fn->common.attributes) { - zend_hash_release(fn->common.attributes); - fn->common.attributes = NULL; - } - } - } ZEND_HASH_FOREACH_END(); - zend_hash_destroy(&ce->function_table); if (zend_hash_num_elements(&ce->constants_table)) { zend_class_constant *c;