mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 13:10:08 +00:00
inspector: Fix a small memory leak
We were leaking overlays.
This commit is contained in:
parent
1a94e5fb0e
commit
280bdb0567
@ -284,6 +284,8 @@ gtk_inspector_window_dispose (GObject *object)
|
||||
|
||||
g_object_set_data (G_OBJECT (iw->inspected_display), "-gtk-inspector", NULL);
|
||||
|
||||
g_clear_object (&iw->flash_overlay);
|
||||
|
||||
G_OBJECT_CLASS (gtk_inspector_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@ -539,6 +541,7 @@ gtk_inspector_window_remove_overlay (GtkInspectorWindow *iw,
|
||||
gtk_inspector_overlay_queue_draw (overlay);
|
||||
|
||||
iw->overlays = g_list_delete_link (iw->overlays, item);
|
||||
g_object_unref (overlay);
|
||||
}
|
||||
|
||||
static GtkInspectorWindow *
|
||||
|
Loading…
Reference in New Issue
Block a user