summaryrefslogtreecommitdiff
path: root/ext/spl/spl_fixedarray.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-09 01:50:15 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-09 01:50:15 +0400
commit7402af380b3a700dda0e89470770fde15bd56204 (patch)
tree4b8c1fdd87745f9ab0ce7f4fd32f07562d8772dc /ext/spl/spl_fixedarray.c
parent0e7d30e8d3d3b7b637e64f6f1e2430d607d01dfc (diff)
downloadphp-git-7402af380b3a700dda0e89470770fde15bd56204.tar.gz
Fixed destruction of objects and iterators on unclean request shutdown and GC (few cases are still unfixed).
Now we destroy objects it two steps. At first - object properties of all objects and only then the objects their selves.
Diffstat (limited to 'ext/spl/spl_fixedarray.c')
-rw-r--r--ext/spl/spl_fixedarray.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index d2339b3a8d..5f7452bed2 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -209,9 +209,6 @@ static void spl_fixedarray_object_free_storage(zend_object *object TSRMLS_DC) /*
zend_object_std_dtor(&intern->std TSRMLS_CC);
zval_ptr_dtor(&intern->retval);
-
- GC_REMOVE_FROM_BUFFER(object);
- efree(intern);
}
/* }}} */
@@ -870,8 +867,6 @@ static void spl_fixedarray_it_dtor(zend_object_iterator *iter TSRMLS_DC) /* {{{
zend_user_it_invalidate_current(iter TSRMLS_CC);
zval_ptr_dtor(&iterator->intern.it.data);
-
- efree(iterator);
}
/* }}} */
@@ -1115,6 +1110,7 @@ PHP_MINIT_FUNCTION(spl_fixedarray)
REGISTER_SPL_STD_CLASS_EX(SplFixedArray, spl_fixedarray_new, spl_funcs_SplFixedArray);
memcpy(&spl_handler_SplFixedArray, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ spl_handler_SplFixedArray.offset = XtOffsetOf(spl_fixedarray_object, std);
spl_handler_SplFixedArray.clone_obj = spl_fixedarray_object_clone;
spl_handler_SplFixedArray.read_dimension = spl_fixedarray_object_read_dimension;
spl_handler_SplFixedArray.write_dimension = spl_fixedarray_object_write_dimension;