#45407 [Opn]: domxml function not documented
| From: | cweismann at ea dot com | Date: | Thu, 10 Jul 2008 14:02:56 +0000 |
| Subject: | #45407 [Opn]: domxml function not documented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-941@lists.php.net to get a copy of this message | ||
ID: 45407
User updated by: cweismann at ea dot com
Reported By: cweismann at ea dot com
Status: Open
Bug Type: Documentation problem
Operating System: Linux
-PHP Version: Irrelevant
+PHP Version: 4.3.2
New Comment:
corrected version number
Previous Comments:
------------------------------------------------------------------------
[2008-07-01 17:51:37] cweismann at ea dot com
Description:
------------
I ran into problems with the memory leak with domxml. I am working on a
very old and very large website and am unable to upgrade to PHP5 until I
have converted all of the old code, so I am writing my code to be
compatible with both PHP4.3.2 and PHP5. After much searching, I located
a bug report at http://bugs.php.net/bug.php?id=30911&edit=1
that
mentioned $doc->free(), but I could not find any documentation for this
function. I later found a very good description in the below post on
http://us2.php.net/domxml-open-mem. This fixed the
problem, but it would
make life easier for other people with the same problem if the
$doc->free(); function was documented.
ej at campbell *dot* name
30-Nov-2003 07:54
<!-- quote -->
The DOM XML parser does not automatically free memory when a
DomDocument goes out of scope.
If you're using the DOM parser to parse several XML files as part of a
long running script, you must free the DomDocument manually or a memory
leak will occur.
To free a DOM document allocated by domxml_open_mem, do the following:
$doc = domxml_open_mem("$contents");
$doc->free();
<!-- end quote -->
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45407&edit=1