I can see where the problem is coming from:

the global that is freed is of type zval *
and allocated (eg in the ZEND_MINIT_FUNCTION) using 

the auto-cleanup works per request, and cleans up everything 
that is allocated with emalloc... also what was intended to be global.

This probably means I have to work around it. OK.

Cheerio, Marc.

>I'm writing a php-module that uses some globals. 
>I use the ZEND_MINIT_FUNCTION as sort of a constructor, and 
>When my module ends, the ZEND_MSHUTDOWN_FUNCTION is 
>called, but the globals are already destroyed by then!
>In ZEND_INIT_MODULE_GLOBALS, I've defined the ctor and dtor 
>functions. The ctor function gets called, but the dtor function NOT.
>Effectively, this gives me no way to control destruction of my own 
>globals, unless I've missed something???
>Can anyone help me with this? I'm developing under VC6.0 and the 
>thread-safe stuff.
>Thanks, Marc.

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to