Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6272 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26939 invoked by uid 1010); 7 Dec 2003 21:53:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26914 invoked from network); 7 Dec 2003 21:53:05 -0000 Received: from unknown (HELO web13426.mail.yahoo.com) (216.136.175.157) by pb1.pair.com with SMTP; 7 Dec 2003 21:53:05 -0000 Message-ID: <20031207215305.61559.qmail@web13426.mail.yahoo.com> Received: from [24.215.130.244] by web13426.mail.yahoo.com via HTTP; Sun, 07 Dec 2003 13:53:05 PST Date: Sun, 7 Dec 2003 13:53:05 -0800 (PST) To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: PHP4 CLI/ISAPI not calling module destructors? From: msisolak@yahoo.com (Michael Sisolak) 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/