> On Tue, Mar 08, 2005 at 05:43:22PM -0500, David W. Bauer Jr. wrote: > > Ok, I have provided the simplest of examples, and cannot account for why > > this is so either, but that doesn't change the fact that it is so. > > I can prove libxml2 actually free the memory. Use > xmllint --repeat --noout network.xml > > it will parse the tree, free it with xmlFreeDoc and repeat the > two operations in a loop 100 times. If it does not call() free > accordingly then your system will swap and the xmllint process will > dies due to the out of memory kernel killer. > > Anyway loading a 300MB instance in memory to then build your own > structures reslly does not make sense, use the reader for this really.
I am basically using libxml2 as a club to solve my problem, and I realize that I should be using the reader.. but this is not a high priority area of my project and so I have been satisfied with this approach for the last couple of years. One problem is that I am primarily using XPath, and do not understand how to combine the reader with XPath efficiently. My XPath searches cover the entire file(s). I chose to do something else (still using libxml2, but not representing all the data in XML format). I just wanted to say that I appreciate your help and I will be revisiting (fixing) this in my code in May. _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
