Skip to content

Instantly share code, notes, and snippets.

@nikic
Created April 14, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikic/2ccbc61c407d5e807781 to your computer and use it in GitHub Desktop.
Save nikic/2ccbc61c407d5e807781 to your computer and use it in GitHub Desktop.
diff --git a/Zend/zend.c b/Zend/zend.c
index 77e0b62..237a161 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -964,12 +964,6 @@ ZEND_API void zend_deactivate(void) /* {{{ */
shutdown_compiler();
} zend_end_try();
-#if ZEND_DEBUG
- if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
- gc_collect_cycles();
- }
-#endif
-
zend_destroy_rsrc_list(&EG(regular_list));
#if GC_BENCH
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index f791692..e55bce9 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -332,7 +332,7 @@ void shutdown_executor(void) /* {{{ */
} zend_end_try();
zend_try {
- zend_objects_store_free_object_storage(&EG(objects_store));
+ //zend_objects_store_free_object_storage(&EG(objects_store));
zend_vm_stack_destroy();
@@ -366,13 +366,20 @@ void shutdown_executor(void) /* {{{ */
zend_stack_destroy(&EG(user_error_handlers_error_reporting));
zend_stack_destroy(&EG(user_error_handlers));
zend_stack_destroy(&EG(user_exception_handlers));
- zend_objects_store_destroy(&EG(objects_store));
if (EG(in_autoload)) {
zend_hash_destroy(EG(in_autoload));
FREE_HASHTABLE(EG(in_autoload));
}
} zend_end_try();
+#if ZEND_DEBUG
+ if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
+ gc_collect_cycles();
+ }
+#endif
+
+ zend_objects_store_destroy(&EG(objects_store));
+
zend_shutdown_fpu();
EG(ht_iterators_used) = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment