On Thu, Jan 29, 2004 at 12:58:36PM -0500, Ron Ohmer
wrote:
> Does anyone have a suggestion as to why I am getting an unhandled
exception on a doc=xmlParseFile(filename).
>
> It is around the 6th
time it runs in a program (Same every time), so I suspect it is running out of
stack space.. After every run thru the parser I am sure to
run:
>
> xmlFreeDoc(doc);
>
xmlCleanupParser();
>
> So, I am confused as to how I am leaving
open memory out there. My stack is:
Do NOT , I repeat and
repeat again and again and again
DO NOT CALL
xmlCleanupParser ON ALL PARSE !!!
DO CALL xmlCleanupParser when your are done
with the LIBRARY !!!
http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser
"Cleanup
function for the XML library. It tries to reclaim all parsing
related
global memory allocated for the library processing. It doesn't
deallocate any document related memory. Calling this function should
not prevent reusing the library but one should call xmlCleanupParser()
only when the process has finished using the library or XML document
built with it."
You're using 4 function. Tell me WHY reading the
doc for the 4 function
is asking too much of your time and asking on the list
is a better option ????
Why bother building docs ? People simply
don't bother to read them :-(
it is *extremely* frustrating :-(
Why
did you call xmlCleanupParser() for each document
????
Daniel
--
Daniel
Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com
| libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/