#34112 [Opn->Bgs]: Memory leak when initiating COM object and then destroying it
| From: | sniper@php.net | Date: | Mon, 15 Aug 2005 16:26:25 +0000 |
| Subject: | #34112 [Opn->Bgs]: Memory leak when initiating COM object and then destroying it | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83601@lists.php.net to get a copy of this message | ||
ID: 34112
Updated by: sniper@php.net
Reported By: James_Brigham at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: COM related
Operating System: Windows 2000 or Windows 2003
PHP Version: 5.0.4
New Comment:
Any memory any PHP function reserves during the REQUEST (the one you
start when you either run a script from command line or access it via
web) it frees AFTER the script has been run.
This is expected behaviour -> not bug.
Previous Comments:
------------------------------------------------------------------------
[2005-08-15 18:17:50] James_Brigham at hotmail dot com
I feel the answer to this problem is very vague and the true problem is
being ignored and glossed over.
------------------------------------------------------------------------
[2005-08-13 01:06:24] James_Brigham at hotmail dot com
Could you explain what you mean by "request is ended"? I would have
thought that the request is ended by the time I received my result set.
Then after I have my result set, I unset it...
------------------------------------------------------------------------
[2005-08-13 01:00:28] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is not something unique to COM but general 'problem' of PHP. All
memory is really cleaned up after request is ended.
------------------------------------------------------------------------
[2005-08-13 00:31:12] James_Brigham at hotmail dot com
if you comment out the query lines, then the memory leak seems to go
away...
the lines I commented out were:
//$threadRecords = $wmi->ExecQuery("SELECT * FROM
Win32_PerfRawData_PerfProc_Process WHERE Name = '" . $sProcName . "'");
//execute a wmi query against our com object
//foreach ($threadRecords as $threadcount) //loop through the resules
//{
//echo("Server:[" . $aryHost[$i] . "] Name: " . $threadcount->Name . "
Count: " . $threadcount->ThreadCount . "\r\n"); //for each result
output basic info to the screen
//}
------------------------------------------------------------------------
[2005-08-13 00:27:39] James_Brigham at hotmail dot com
As suggested, I have downloaded the latest release from:
http://snaps.php.net/win32/php5-win32-latest.zip
and I still see the same memory leak.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34112
--
Edit this bug report at http://bugs.php.net/?id=34112&edit=1