mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
macos: Stop using g_slice
This commit is contained in:
parent
6f93baf420
commit
15d73a1adb
@ -283,7 +283,7 @@ static void
|
||||
push_nsevent (GdkEvent *gdk_event,
|
||||
NSEvent *nsevent)
|
||||
{
|
||||
GdkToNSEventMap *map = g_slice_new0 (GdkToNSEventMap);
|
||||
GdkToNSEventMap *map = g_new0 (GdkToNSEventMap, 1);
|
||||
|
||||
map->link.data = map;
|
||||
map->gdk_event = gdk_event_ref (gdk_event);
|
||||
@ -297,7 +297,7 @@ push_nsevent (GdkEvent *gdk_event,
|
||||
|
||||
gdk_event_unref (map->gdk_event);
|
||||
[map->nsevent release];
|
||||
g_slice_free (GdkToNSEventMap, map);
|
||||
g_free (map);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ gdk_macos_zoomback_destroy (GdkMacosZoomback *zb)
|
||||
{
|
||||
gdk_surface_hide (GDK_SURFACE (zb->drag->drag_surface));
|
||||
g_clear_object (&zb->drag);
|
||||
g_slice_free (GdkMacosZoomback, zb);
|
||||
g_free (zb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -157,7 +157,7 @@ gdk_macos_drag_drop_done (GdkDrag *drag,
|
||||
/* Apple HIG suggests doing a "zoomback" animation of the surface back
|
||||
* towards the original position.
|
||||
*/
|
||||
zb = g_slice_new0 (GdkMacosZoomback);
|
||||
zb = g_new0 (GdkMacosZoomback, 1);
|
||||
zb->drag = g_object_ref (self);
|
||||
zb->frame_clock = gdk_surface_get_frame_clock (GDK_SURFACE (self->drag_surface));
|
||||
zb->start_time = gdk_frame_clock_get_frame_time (zb->frame_clock);
|
||||
|
@ -423,7 +423,7 @@ write_request_free (WriteRequest *wr)
|
||||
g_clear_pointer (&wr->main_context, g_main_context_unref);
|
||||
g_clear_object (&wr->stream);
|
||||
[wr->item release];
|
||||
g_slice_free (WriteRequest, wr);
|
||||
g_free (wr);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -491,7 +491,7 @@ on_data_ready_cb (GObject *object,
|
||||
return;
|
||||
}
|
||||
|
||||
wr = g_slice_new0 (WriteRequest);
|
||||
wr = g_new0 (WriteRequest, 1);
|
||||
wr->item = [item retain];
|
||||
wr->stream = G_MEMORY_OUTPUT_STREAM (g_memory_output_stream_new_resizable ());
|
||||
wr->type = type;
|
||||
|
Loading…
Reference in New Issue
Block a user