diff options
| author | Zeev Suraski <zeev@php.net> | 2003-03-02 15:24:04 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 2003-03-02 15:24:04 +0000 |
| commit | 36eae0b771e7e77e1f52b2a69c94dfb99f5daaad (patch) | |
| tree | baeb811d7541804711daaf35d3b9339ab03cb544 /Zend/zend_execute_API.c | |
| parent | cbb3e6fd2fb9e47ff4fd8868d80567042e85c1cd (diff) | |
| download | php-git-36eae0b771e7e77e1f52b2a69c94dfb99f5daaad.tar.gz | |
Fix destructors some more
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 0b1020a7b1..39711ea2c7 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -219,14 +219,6 @@ void shutdown_executor(TSRMLS_D) zend_hash_destroy(&EG(symbol_table)); - while (EG(garbage_ptr)--) { - if (EG(garbage)[EG(garbage_ptr)]->refcount==1) { - zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]); - } - } - - zend_ptr_stack_destroy(&EG(argument_stack)); - /* Cleanup static data for functions and arrays. We need separate cleanup stage because of the following problem: Suppose we destroy class X, which destroys function table, @@ -238,6 +230,15 @@ void shutdown_executor(TSRMLS_D) not contain objects and thus are not probelmatic */ zend_hash_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC); zend_hash_apply(EG(class_table), (apply_func_t) zend_cleanup_class_data TSRMLS_CC); + + while (EG(garbage_ptr)) { + if (EG(garbage)[--EG(garbage_ptr)]->refcount==1) { + zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]); + } + } + + zend_ptr_stack_destroy(&EG(argument_stack)); + /* Destroy all op arrays */ if (EG(full_tables_cleanup)) { zend_hash_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC); |
