summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-04-24 14:49:00 +0000
committerfoobar <sniper@php.net>2005-04-24 14:49:00 +0000
commiteb393b600cf645d639d9ca5fc9aaa4bdcefd9e65 (patch)
tree81858660926f296c6c4c7b4f0413f7e5e552a2c4 /Zend/zend_execute_API.c
parent81afaf32d73a28f322b827c0c3e88c3ec913f481 (diff)
downloadphp-git-eb393b600cf645d639d9ca5fc9aaa4bdcefd9e65.tar.gz
MFH: - Execute destructors earlier
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 3d31332b6e..ea944e0840 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -185,6 +185,15 @@ void init_executor(TSRMLS_D)
EG(This) = NULL;
}
+void shutdown_destructors(TSRMLS_D) {
+ zend_try {
+ zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC);
+ } zend_catch {
+ /* if we couldn't destruct cleanly, mark all objects as destructed anyway */
+ zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
+ } zend_end_try();
+}
+
void shutdown_executor(TSRMLS_D)
{
zend_try {
@@ -204,7 +213,6 @@ void shutdown_executor(TSRMLS_D)
}
*/
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator TSRMLS_CC);
- zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC);
zend_hash_graceful_reverse_destroy(&EG(symbol_table));
} zend_catch {
/* if we couldn't destruct cleanly, mark all objects as destructed anyway */