[libadwaita/wip/exalm/tab-overview: 9/15] animation: Don't leak widget
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/tab-overview: 9/15] animation: Don't leak widget
- Date: Tue, 12 Oct 2021 08:51:31 +0000 (UTC)
commit 0c692cdbb7d2cbc4b978be6cc7b399d00253de37
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Aug 21 18:53:02 2021 +0500
animation: Don't leak widget
src/adw-animation.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/adw-animation.c b/src/adw-animation.c
index 521398bf..d858491b 100644
--- a/src/adw-animation.c
+++ b/src/adw-animation.c
@@ -169,12 +169,24 @@ adw_animation_constructed (GObject *object)
G_OBJECT_CLASS (adw_animation_parent_class)->constructed (object);
}
+static void
+adw_animation_dispose (GObject *object)
+{
+ AdwAnimation *self = ADW_ANIMATION (object);
+ AdwAnimationPrivate *priv = adw_animation_get_instance_private (self);
+
+ g_clear_object (&priv->widget);
+
+ G_OBJECT_CLASS (adw_animation_parent_class)->dispose (object);
+}
+
static void
adw_animation_class_init (AdwAnimationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructed = adw_animation_constructed;
+ object_class->dispose = adw_animation_dispose;
object_class->set_property = adw_animation_set_property;
object_class->get_property = adw_animation_get_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]