mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-20 18:50:08 +03:00
windows: Use DllMain for cleanup
This commit is contained in:
parent
5f3f66c683
commit
a87944e970
@ -1007,6 +1007,13 @@ DllMain(ATTRIBUTE_UNUSED HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
#ifndef LIBXML_THREAD_ALLOC_ENABLED
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (xmlFree == free)
|
||||
xmlCleanupParser();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -385,13 +385,6 @@ static int onceControl = 0;
|
||||
|
||||
static void
|
||||
xmlInitParserInternal(void) {
|
||||
#if defined(_WIN32) && \
|
||||
!defined(LIBXML_THREAD_ALLOC_ENABLED) && \
|
||||
(!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
||||
if (xmlFree == free)
|
||||
atexit(xmlCleanupParser);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Note that the initialization code must not make memory allocations.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user