Resources and zend_register_list_destructors_ex

[email protected] ("Dave Viner") Wed, 5 Mar 2003 15:30:15 -0800
Newsgroups php.dev
Message-ID <[email protected]>
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