Re: [xml] libxml free problem
- From: Trappel Martin <martin trappel ksengineers at>
- To: 'Ke Tao' <kotao78 gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] libxml free problem
- Date: Fri, 15 Jun 2007 11:44:27 +0200
Call xmlCleanupParser(); after you have finished using libxml2
You also may want to call xmlInitParser(); before using it.
best regards / mit freundlichen Grüßen,
Martin Trappel
________________________________
From: Ke Tao [mailto:kotao78 gmail com]
Sent: Friday, June 15, 2007 11:16 AM
To: xml gnome org
Subject: [xml] libxml free problem
HI ALL,
I encounter a problem on libxml free problem.
I simple use a code like below,
xmlDocPtr doc;
xmlNodePtr cur;
.......
doc = xmlReadMemory(pBuf, (int)strlen(pBuf), " recbuf.xml",
NULL, 0);
if (doc == NULL)
{
return ret;
}
.....
cur = xmlDocGetRootElement(doc);
.....
//do some thing
xmlFreedoc(doc);
...
But I use valgrind check above code , find this code always has
memory problem , the valgrind log is,
Best Regards,
Ke Tao
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]