Resources and zend_register_list_destructors_ex
| From: | Dave Viner | Date: | Wed, 05 Mar 2003 23:30:15 +0000 |
| Subject: | Resources and zend_register_list_destructors_ex | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-94826@lists.php.net to get a copy of this message | ||
Hi,
I'm having some trouble understanding persistent versus non-persistent
resources (in ZE1). Does the Zend engine call _any_ non-persistent callback
dtor function for a resource at the end of a request?
For example:
If I register a resource type at MINIT time like so:
le_mod = zend_register_list_destructors_ex
(destroy_mod, NULL, MOD_TYPE_NAME, module_number);
then my resource will be destroyed at the end of each request. However, if
I register a resource type at MINIT time like so:
le_mod = zend_register_list_destructors_ex
(NULL, destroy_mod, MOD_TYPE_NAME, module_number);
then my resource will be destroyed at the end of the _process_.
If I register my resource type like this:
le_mod = zend_register_list_destructors_ex
(destroy_mod, destroy_mod, MOD_TYPE_NAME, module_number);
Is that the equivalent of registering a non-persistent type?
thanks
dave