Re: [xml] xmlReadFile(...) crashing on 2nd time around



On 10/12/2009, Andrew Hartley <andrew hartley bcs org uk> wrote:

This is my code to read an XML file, which works fine the 1st time around,
but crashes the 2nd time around.  I must be not calling a required library
function to tidy up and would appreciate if someone could advise on what I
should do.

...

      xmlCleanupParser();

Remove that from your destructor.

<http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser>

"This function name is somewhat misleading. It does not clean up
parser state, it cleans up memory allocated by the library itself"

Martin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]