cvs: ZendEngine2 / zend_execute_API.c

From: Date: Sun, 02 Mar 2003 15:24:04 +0000
Subject: cvs: ZendEngine2 / zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-984@lists.php.net to get a copy of this message
zeev Sun Mar 2 10:24:04 2003 EDT Modified files: /ZendEngine2 zend_execute_API.c Log: Fix destructors some more Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.197 ZendEngine2/zend_execute_API.c:1.198 --- ZendEngine2/zend_execute_API.c:1.197 Sun Feb 16 06:34:49 2003 +++ ZendEngine2/zend_execute_API.c Sun Mar 2 10:24:04 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.197 2003/02/16 11:34:49 sebastian Exp $ */ +/* $Id: zend_execute_API.c,v 1.198 2003/03/02 15:24:04 zeev Exp $ */ #include <stdio.h> #include <signal.h> @@ -219,14 +219,6 @@ 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 @@ 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);

« previous php.zend-engine.cvs (#984) next »