PHP4 CLI/ISAPI not calling module destructors?

From: Date: Sun, 07 Dec 2003 21:53:05 +0000
Subject: PHP4 CLI/ISAPI not calling module destructors?
Groups: php.internals 
Request: Send a blank email to internals+get-6272@lists.php.net to get a copy of this message
I've been looking into the memory leaks reported in the ISAPI in bug report #23331 and believe that I've found something quite odd. It looks like the module destructors (such as basic_globals_dtor()) are not getting called in either the ISAPI or the CLI. ts_allocate_id() correctly adds the dtors to the resource_types_table, but the only place I can find that those dtors would be called from is the ts_free_thread() function. The CLI never calls ts_free_thread(), and the ISAPI doesn't call is for the final DLL_PROCESS_DETATCH thread. Is there a place that I'm missing where these dtors should be getting called? If I add a ts_free_thread() before the final tsrm_shutdown() in php_cli.c then in my testing (all Win32) the dtors do then get called correctly. Michael Sisolak msisolak@yahoo.com __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/

« previous php.internals (#6272) next »