Skip to content

Commit

Permalink
Remove zend_cleanup_internal_classes()
Browse files Browse the repository at this point in the history
If fast_shutdown is used, then we don't need to destroy static
members at all. If fast_shutdown is not used, then we already
loop over classes to destroy static members and static variables
in methods.
  • Loading branch information
nikic committed Jul 23, 2021
1 parent 8befb6d commit 89d0115
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -3010,17 +3010,6 @@ ZEND_API void zend_deactivate_modules(void) /* {{{ */
}
/* }}} */

ZEND_API void zend_cleanup_internal_classes(void) /* {{{ */
{
zend_class_entry **p = class_cleanup_handlers;

while (*p) {
zend_cleanup_internal_class_data(*p);
p++;
}
}
/* }}} */

ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
{
if (EG(full_tables_cleanup)) {
Expand Down
1 change: 0 additions & 1 deletion Zend/zend_compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,6 @@ ZEND_API void zend_destroy_static_vars(zend_op_array *op_array);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
ZEND_API void zend_cleanup_mutable_class_data(zend_class_entry *ce);
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
ZEND_API void zend_cleanup_internal_classes(void);
ZEND_API void zend_type_release(zend_type type, bool persistent);
ZEND_API zend_string *zend_create_member_string(zend_string *class_name, zend_string *member_name);

Expand Down
1 change: 0 additions & 1 deletion Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ void shutdown_executor(void) /* {{{ */
*/
zend_hash_discard(EG(function_table), EG(persistent_functions_count));
zend_hash_discard(EG(class_table), EG(persistent_classes_count));
zend_cleanup_internal_classes();
} else {
zend_vm_stack_destroy();

Expand Down

0 comments on commit 89d0115

Please sign in to comment.