SF>>Erm, Stas, it's not because it's impossible - it's because that SF>>module_shutdown_func happens to be the module's MSHUTDOWN. The contents of SF>>MSHUTDOWN generally look something like: SF>> SF>>#ifdef ZTS SF>>ts_free_id(pcre_globals_id); SF>>#else SF>>php_pcre_shutdown_globals(&pcre_globals TSRMLS_CC); SF>>#endif SF>> SF>>UNREGISTER_INI_ENTRIES(); SF>> SF>>return SUCCESS;
That's quite an assumption. What if it looks like: if(MODULE_G(flag)) { do_complicated_shutdown(MODULE_G(data)); } before your code, and you have already freed the MODULE_G's id? SF>>I'm not changing a darn thing in the order of the calls there, and that's SF>>*exactly* why I don't get your point. You are changing the order of ts_free_id's however - once you assumption of "one alloc exactly per module" is wrong, you can have free_id before dtor is called. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php