[gtk] inspector: Fix a small memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] inspector: Fix a small memory leak
- Date: Wed, 25 Dec 2019 14:53:26 +0000 (UTC)
commit 280bdb0567ce51565fc16c587a8ee361ce54a36e
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Dec 24 19:42:14 2019 -0500
inspector: Fix a small memory leak
We were leaking overlays.
gtk/inspector/window.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index 2d82629124..6b4b2524d5 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]