[xml] Libxml2 xmlCleanupParser with C++ and Windows DLL
- From: Trappel Martin <martin trappel ksengineers at>
- To: xml gnome org
- Subject: [xml] Libxml2 xmlCleanupParser with C++ and Windows DLL
- Date: Tue, 24 Apr 2007 17:57:56 +0200
Hi all,
Can someone who uses libxml2 on windows maybe comment on this:
To get around the multithreading problem with xmlInitParser/xmlCleanupParser
I would use a global class object in my dll that makes use uf libxml2 to do
the init/cleanup:
[code]
class XmlInitializationClass
{
public:
XmlInitializationClass() {
::xmlInitParser();
}
~XmlInitializationClass() {
::xmlCleanupParser();
}
};
XmlInitializationClass xml_init_object;
[/code]
It seems to work fine for me. (Win XP / VS2005)
Any comments if this could pose problems either from the DLL
loading/unloading side or from the libxml2 side?
Thanks!
best regards / mit freundlichen Grüßen,
Martin Trappel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]