Partially enable leak reports for objects

Cycle leaks are currently not reported, because this needs further
work.

The last GC run has been moved to run earlier (before the object
store free), so that array cycles that hold references to objects
don't show up as leaks. Fingers crossed that this doesn't adversely
affect anything else.
This commit is contained in:
Nikita Popov 2015-04-17 12:37:51 +02:00
parent f616a6f1eb
commit aef96d5169
3 changed files with 11 additions and 9 deletions

View file

@ -331,6 +331,12 @@ void shutdown_executor(void) /* {{{ */
zend_close_rsrc_list(&EG(regular_list));
} zend_end_try();
#if ZEND_DEBUG
if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
gc_collect_cycles();
}
#endif
zend_try {
zend_objects_store_free_object_storage(&EG(objects_store));