On Wed, May 23, 2012 at 12:49:11PM -0700, Aman Wardak wrote:
> Hello,
> 
> I'm parsing some XML files and using XPath and after going through each
> file, I'm cleaning up like this:
> 
>     if (xpathCtx)
>         xmlXPathFreeContext(xpathCtx);
>     if (doc)
>         xmlFreeDoc(doc);
> 
>     xmlCleanupParser();

Don't do that, read the doc !

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

Daniel
-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to