Stop using GSlice

It has been inofficially deprecated for years, is known to cause issues
with valgrind and potentially hides memory corruption.
Lets stop using it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1473
This commit is contained in:
Robert Mader
2020-10-19 20:12:27 +02:00
parent d72da7d246
commit 22f691939c
12 changed files with 39 additions and 39 deletions

View File

@ -1581,7 +1581,7 @@ run_leisure_functions (gpointer data)
if (closure->notify)
closure->notify (closure->user_data);
g_slice_free (LeisureClosure, closure);
g_free (closure);
}
g_slist_free (closures);
@ -1670,7 +1670,7 @@ shell_global_run_at_leisure (ShellGlobal *global,
gpointer user_data,
GDestroyNotify notify)
{
LeisureClosure *closure = g_slice_new (LeisureClosure);
LeisureClosure *closure = g_new (LeisureClosure, 1);
closure->func = func;
closure->user_data = user_data;
closure->notify = notify;