[libhandy/wip/exalm/alpha-fixes: 3/8] shadow-helper: Don't ref widget
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/wip/exalm/alpha-fixes: 3/8] shadow-helper: Don't ref widget
- Date: Thu, 11 Nov 2021 19:53:18 +0000 (UTC)
commit 532a7cbcb97a27833e98d46db383d0509cb945d6
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Nov 12 00:34:49 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.
Backported from
https://gitlab.gnome.org/GNOME/libadwaita/-/commit/d1da4bd8e5791cc6831cb1579843156b24a988cd
src/hdy-shadow-helper.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/hdy-shadow-helper.c b/src/hdy-shadow-helper.c
index cf8ceb09..03d83a33 100644
--- a/src/hdy-shadow-helper.c
+++ b/src/hdy-shadow-helper.c
@@ -194,8 +194,7 @@ hdy_shadow_helper_dispose (GObject *object)
hdy_shadow_helper_clear_cache (self);
- if (self->widget)
- g_clear_object (&self->widget);
+ self->widget = NULL;
G_OBJECT_CLASS (hdy_shadow_helper_parent_class)->dispose (object);
}
@@ -228,7 +227,7 @@ hdy_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]