[PHP-DEV] ZEND_MINIT_FUNCTION and ZEND_INIT_MODULE_GLOBALS question: additional info

2001-02-27 Thread Marc Boeren
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 MAKE_STD_ZVAL... the auto-cleanup works per request, and cleans up everything that is allocated with emalloc... also what was intended to be global. This

[PHP-DEV] ZEND_MINIT_FUNCTION and ZEND_INIT_MODULE_GLOBALS question

2001-02-27 Thread Marc Boeren
Hi! I'm writing a php-module that uses some globals. I use the ZEND_MINIT_FUNCTION as sort of a constructor, and call ZEND_INIT_MODULE_GLOBALS here. 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 def