[libadwaita/wip/exalm/new-glib: 13/16] shadow-helper: Don't ref widget
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/new-glib: 13/16] shadow-helper: Don't ref widget
- Date: Wed, 3 Nov 2021 00:41:29 +0000 (UTC)
commit d1da4bd8e5791cc6831cb1579843156b24a988cd
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Nov 3 00:28:20 2021 +0500
shadow-helper: Don't ref widget
This is a private object, no need to bother with with weak refs. Just avoid
a refcycle.
src/adw-shadow-helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/adw-shadow-helper.c b/src/adw-shadow-helper.c
index f61e553d..41366704 100644
--- a/src/adw-shadow-helper.c
+++ b/src/adw-shadow-helper.c
@@ -68,7 +68,7 @@ adw_shadow_helper_dispose (GObject *object)
g_clear_pointer (&self->shadow, gtk_widget_unparent);
g_clear_pointer (&self->border, gtk_widget_unparent);
g_clear_pointer (&self->outline, gtk_widget_unparent);
- g_clear_object (&self->widget);
+ self->widget = NULL;
G_OBJECT_CLASS (adw_shadow_helper_parent_class)->dispose (object);
}
@@ -101,7 +101,7 @@ adw_shadow_helper_set_property (GObject *object,
switch (prop_id) {
case PROP_WIDGET:
- self->widget = GTK_WIDGET (g_object_ref (g_value_get_object (value)));
+ self->widget = g_value_get_object (value);
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]