Re: [xml] Memory not going away.. SOLUTION
- From: "David W. Bauer Jr." <bauerd cs rpi edu>
- To: xml gnome org
- Subject: Re: [xml] Memory not going away.. SOLUTION
- Date: Tue, 8 Mar 2005 13:01:26 -0500 (EST)
Recall I had:
xmlXPathInit();
document_network = xmlParseFile(filename);
ctxt = xmlXPathNewContext(document_network);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(document_network);
xmlCleanupParser();
xmlMemoryDump();
The solution:
xmlXPathInit();
document_network = xmlParseFile(filename);
ctxt = xmlXPathNewContext(document_network);
xmlXPathFreeContext(ctxt);
xmlCleanupParser();
xmlFreeDoc(document_network);
xmlMemoryDump();
Notice that I need to cleanup the parser prior to freeing the document.
David Bauer
Ph.D Candidate, Rensselaer Polytechnic Institute
Computer Science Department
Office: Amos Eaton 205
Phone : (518) 276 2657
URI : http://www.cs.rpi.edu/~bauerd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]