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:
Ryan Lortie
2011-10-04 16:08:27 -04:00
parent dd09a95543
commit f1512917e6
3 changed files with 54 additions and 46 deletions

View File

@@ -225,6 +225,10 @@ DllMain (HINSTANCE hinstDLL,
glib_init ();
break;
case DLL_THREAD_DETACH:
g_thread_win32_thread_detach ();
break;
default:
/* do nothing */
;