Unai Astorquiza wrote:
> Hi,
> 
> I'm having a crash when I call xmlCleanupParser() and I've some doubts about 
> the use of this function.
> 
> I'm developing a library that loads and uses libxml, and I call 
> xmlCleanupParser in the destructor/DllMain of the library, when I'm finished 
> using it.
> 
> The question is: if someone uses my library and also uses libxml by his own 
> in a process, my call to xmlCleanupParser would affect the other instance of 
> libxml?

It all depends on how you link libxml2.

If you link dynamically, this may cause problems if the client code
links dynamically with a more recent (or older) libxml2, and your
call to xmlCleanupParser could affect your client code.

If you link statically, there is no problem - all calls are resolved
when building your DLL, so there should be no unexpected interaction
with client code.

To me, this makes static linkage seem like the best approach for using
libxml in a DLL.

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to