[sysprof/wip/gtk4-port] display: remove stack on dispose
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/gtk4-port] display: remove stack on dispose
- Date: Fri, 1 Oct 2021 22:34:34 +0000 (UTC)
commit 8f1c24b66be0b013065fbf973db5ce702924da8b
Author: Christian Hergert <chergert redhat com>
Date: Fri Oct 1 15:25:53 2021 -0700
display: remove stack on dispose
src/libsysprof-ui/sysprof-display.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-display.c b/src/libsysprof-ui/sysprof-display.c
index d4be74ee..bf58aa3f 100644
--- a/src/libsysprof-ui/sysprof-display.c
+++ b/src/libsysprof-ui/sysprof-display.c
@@ -361,15 +361,21 @@ stop_recording_cb (GSimpleAction *action,
}
static void
-sysprof_display_finalize (GObject *object)
+sysprof_display_dispose (GObject *object)
{
SysprofDisplay *self = (SysprofDisplay *)object;
SysprofDisplayPrivate *priv = sysprof_display_get_instance_private (self);
+ if (priv->stack)
+ {
+ gtk_widget_unparent (GTK_WIDGET (priv->stack));
+ priv->stack = NULL;
+ }
+
g_clear_pointer (&priv->reader, sysprof_capture_reader_unref);
g_clear_pointer (&priv->filter, sysprof_capture_condition_unref);
- G_OBJECT_CLASS (sysprof_display_parent_class)->finalize (object);
+ G_OBJECT_CLASS (sysprof_display_parent_class)->dispose (object);
}
static void
@@ -432,7 +438,7 @@ sysprof_display_class_init (SysprofDisplayClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->finalize = sysprof_display_finalize;
+ object_class->dispose = sysprof_display_dispose;
object_class->get_property = sysprof_display_get_property;
object_class->set_property = sysprof_display_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]