src: 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.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1512>
This commit is contained in:
Robert Mader
2020-10-19 19:57:57 +02:00
parent 8b977e9046
commit 6eeeffdc68
39 changed files with 91 additions and 91 deletions

View File

@ -385,7 +385,7 @@ data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab)
meta_display_sync_wayland_input_focus (meta_get_display ());
}
g_slice_free (MetaWaylandDragGrab, drag_grab);
g_free (drag_grab);
}
static gboolean
@ -583,7 +583,7 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
ClutterModifierType modifiers;
MetaSurfaceActor *surface_actor;
data_device->current_grab = drag_grab = g_slice_new0 (MetaWaylandDragGrab);
data_device->current_grab = drag_grab = g_new0 (MetaWaylandDragGrab, 1);
drag_grab->generic.interface = funcs;
drag_grab->generic.pointer = seat->pointer;