]> git.sesse.net Git - vlc/commitdiff
Win32: use linked_with_a_crap_library_which_uses_atexit() (libxml2 and libqt4)
authorErwan Tulou <erwan10@videolan.org>
Mon, 22 Feb 2010 20:55:16 +0000 (21:55 +0100)
committerErwan Tulou <erwan10@videolan.org>
Wed, 24 Feb 2010 20:29:19 +0000 (21:29 +0100)
  On windows,
  - libxml2 spawns a 'watchdog' thread, when statically linked.
  - libqt4 spawns a 'watcher' thread.

  These threads clean up remaining ressources once their initiator thread has
  terminated. So, the associated dll must NOT be freed explicitly and blindly.
  Since there is no means to know when these 'cleanup' threads terminate,
  the safe approach is to not free the dlls and let freeing occur when vlc
  terminates.

modules/gui/qt4/qt4.cpp
modules/misc/xml/libxml.c

index b70275616a616707552562ed2b6c23262f70f69d..d3d9ad266cbad4ef94f6681d2d42db219c07959d 100644 (file)
@@ -246,6 +246,10 @@ vlc_module_begin ()
 
     add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
 
+#ifdef WIN32
+    linked_with_a_crap_library_which_uses_atexit()
+#endif
+
     add_submodule ()
         set_description( "Dialogs provider" )
         set_capability( "dialogs provider", 51 )
index 71f26e69ab06b4e1640a2583201be0c27e9992be..80c44a5252176a2ae2d0df3f39369ccb9012b1c1 100644 (file)
@@ -45,6 +45,11 @@ vlc_module_begin ()
     set_description( N_("XML Parser (using libxml2)") )
     set_capability( "xml", 10 )
     set_callbacks( Open, Close )
+
+#ifdef WIN32
+    linked_with_a_crap_library_which_uses_atexit()
+#endif
+
 vlc_module_end ()
 
 struct xml_reader_sys_t