#41479 [Opn->Csd]: Memory Leaks when creating a DOMDocument
| From: | cmmtch at rit dot edu | Date: | Fri, 25 May 2007 19:41:59 +0000 |
| Subject: | #41479 [Opn->Csd]: Memory Leaks when creating a DOMDocument | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-113033@lists.php.net to get a copy of this message | ||
ID: 41479
User updated by: cmmtch at rit dot edu
Reported By: cmmtch at rit dot edu
-Status: Open
+Status: Closed
Bug Type: DOM XML related
Operating System: SunOS 5.10 sparc
PHP Version: 5.2.2
New Comment:
This was actually do to xdebug
Previous Comments:
------------------------------------------------------------------------
[2007-05-23 21:11:51] cmmtch at rit dot edu
Description:
------------
Every time you create a new DOMDocument, even if you unset it directly
afterwards, a small amount of memory is leaked.
Reproduce code:
---------------
<?php
while(true){
$doc = new DOMDocument();
unset($doc);
}
?>
Expected result:
----------------
Check the memory usage after a few seconds and notice it will go up
dramatically.
Actual result:
--------------
When checking how much memory is used by this process, it will go up
with time, even though no variables are being left unset. This means
that every time a new DOMDocument is constructed, it allocates more
memory than it's destructor is handling. This can be very bad when
creating lots of DOMDocuments within a single process.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41479&edit=1