Skip to content

Document .dtor_obj and .free_obj #6656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Zend/zend_object_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,16 @@ typedef zend_function *(*zend_object_get_method_t)(zend_object **object, zend_st
typedef zend_function *(*zend_object_get_constructor_t)(zend_object *object);

/* Object maintenance/destruction */
/* .dtor_obj is called while the executor is active, which means it can call
* user code. Use std_object_handlers.dtor_obj for .dtor_obj unless necessary,
* as providing something else breaks leak detection.
*/
typedef void (*zend_object_dtor_obj_t)(zend_object *object);

/* .free_obj is called while the executor is not active, which means it can not
* call user code. In some cases .dtor_obj is called before .free_obj, but it is
* not guaranteed, such as hitting a fatal error.
*/
typedef void (*zend_object_free_obj_t)(zend_object *object);
typedef zend_object* (*zend_object_clone_obj_t)(zend_object *object);

Expand Down