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:
@ -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;
|
||||
|
Reference in New Issue
Block a user