[gtk/builder-leaks: 2/2] coloreditor: Don't unref unless we own it
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/builder-leaks: 2/2] coloreditor: Don't unref unless we own it
- Date: Mon, 27 Sep 2021 20:43:29 +0000 (UTC)
commit 834c72bb0f66038c9c5b6c7acb2ffbb1840c1909
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 27 16:40:29 2021 -0400
coloreditor: Don't unref unless we own it
Calling gtk_widget_class_bind_template_child does
*not* give you a reference that you need to unref.
It manages the reference for you. So calling
g_clear_object on such a member is wrong.
gtk/gtkcoloreditor.c | 3 ---
1 file changed, 3 deletions(-)
---
diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c
index 85a0c3df0e..84f2fe490b 100644
--- a/gtk/gtkcoloreditor.c
+++ b/gtk/gtkcoloreditor.c
@@ -447,9 +447,6 @@ gtk_color_editor_dispose (GObject *object)
dismiss_current_popup (editor);
g_clear_object (&editor->picker);
- g_clear_object (&editor->h_adj);
- g_clear_object (&editor->s_adj);
- g_clear_object (&editor->v_adj);
G_OBJECT_CLASS (gtk_color_editor_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]