Should tsrm_shutdown() be calling resource_types_table dtors?

From: Date: Mon, 08 Dec 2003 16:10:22 +0000
Subject: Should tsrm_shutdown() be calling resource_types_table dtors?
Groups: php.internals 
Request: Send a blank email to internals+get-6288@lists.php.net to get a copy of this message
Following up on my question about the Win32 ISAPI/CLI not calling any of the destructor functions I've continued to dig into the TSRM code. I believe the issue is that tsrm_shutdown() doesn't call the destructors for each of the items in thread storage before freeeing them. This does happen in ts_free_thread(), but it looks like tsrm_shutdown() isn't accounting for a thread that hasn't had ts_free_thead() called on it before shutdown. I've attached a patch that I came up with that calls the dtors in tsrm_shutdown() just as they are in ts_free_thread() (i.e., first calling all destructors, and then freeing all items). This eliminates a huge pile of thread shutdown memory leaks for ISAPI and Win32 CLI. Is there a reason not to do this (i.e., I can't test non-Win32 builds so maybe there is a reason this isn't done this way)? Michael Sisolak msisolak@yahoo.com __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/

« previous php.internals (#6288) next »