Michael Tremel wrote:
> I've made the changes you've suggested,
> but the same results from Valgrind keep showing up. Even after adding
> xmlParserCleanup(), there are 10 allocs and 9 frees leaving 84 bytes
> "still reachable". I
>>> int main()
>>> {
>>> xmlParserCtxtPtr ctxt = xmlNewParserCtxt();
You should first initialize the library, using the LIBXML_TEST_VERSION
macro. Still don't forget to add xmlCleanupParser() at the very end:
#include <libxml/parser.h>
int main()
{
xmlParserCtxtPtr ctxt;
LIBXML_TEST_VERSION;
ctxt = xmlNewParserCtxt();
xmlInitParserCtxt(ctxt);
xmlFreeParserCtxt(ctxt);
xmlCleanupParser();
return 0;
}
I suggest you should look at the examples too:
http://www.xmlsoft.org/examples/index.html
Cheers, Andy
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml