RE: [xml] Segmentation fault in xmlFreeDoc
- From: "Buchcik, Kasimier" <k buchcik 4commerce de>
- To: "Chidanand Gangur" <chidanand gangur gmail com>
- Cc: xml gnome org
- Subject: RE: [xml] Segmentation fault in xmlFreeDoc
- Date: Fri, 19 May 2006 12:58:49 +0200
Hi,
-----Original Message-----
From: Chidanand Gangur [mailto:chidanand gangur gmail com]
thanks Kasimier,
I will suerly try your suggestion. But what confused me is
the explanation of the API.
Cleanup function for the XML library. It tries to reclaim all
parsing related global memory allocated for the library
processing. It doesn't deallocate any document related
memory. Calling this function should not prevent reusing the
library but one should call xmlCleanupParser() only when the
process has finished using the library or XML document built with it.
I went with the last line.
Since you have a multithreaded scenario, there were probably still
some docs around in some threads while an other thread called
xmlCleanupParser() and killed some data the docs were using. The
last line applies in multithreaded scenarios to _all_ docs; so if
you free all docs before a call to xmlCleanupParser() then you
might have a chance to survive. Just call it once at the end of
your app; plus call xmlInitParser() at the beginning of your
multithreaded app:
http://xmlsoft.org/html/libxml-parser.html#xmlInitParser
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]