I have a library that uses the static libxml2 library. My library is distributed in three ways: a DLL, a static library that has the libxml2 library merged, and a static library that does not have libxml2 merged. I have a Windows environment where my DLL is late-bound and being loaded and unloaded multiple times by an application using LoadLibrary and FreeLibrary. After 1088 iterations of loading and unloading my DLL, the thread local storage allocation will fail (TLSAlloc) since it is not being freed by calling xmlCleanupParser.
I see there is a define, LIBXML_STATIC_FOR_DLL, and a static build (libxml2_a_dll.lib) for this situation, and building and using this static library fixes the issue. Is it safe to use the libxml2 build with the LIBXML_STATIC_FOR_DLL defined in all my library configurations (DLL and static with libxml2 merged)? Is it safe to use when the DLL is early-bound? Is this build safe to use for non-Windows platforms?
_______________________________________________ xml mailing list, project page http://xmlsoft.org/ firstname.lastname@example.org https://mail.gnome.org/mailman/listinfo/xml