mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-25 19:56:31 +01:00
win32: stop leaking GPrivate data
Instead of running the GPrivate destructors from our thread proxy code, run it from the DllMain handler for the DLL_THREAD_DETACH case. This should ensure that thread-local data is free at the exit of all threads -- not just the ones we created for ourselves. https://bugzilla.gnome.org/show_bug.cgi?id=660745
This commit is contained in:
@@ -225,6 +225,10 @@ DllMain (HINSTANCE hinstDLL,
|
||||
glib_init ();
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
g_thread_win32_thread_detach ();
|
||||
break;
|
||||
|
||||
default:
|
||||
/* do nothing */
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user