[libadwaita/wip/exalm/pref-leak] preferences-window: Don't leak the filter model
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/pref-leak] preferences-window: Don't leak the filter model
- Date: Thu, 14 Oct 2021 08:37:55 +0000 (UTC)
commit 050aafe2d75b06544f679a1a945e269a6683f806
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Oct 14 13:37:25 2021 +0500
preferences-window: Don't leak the filter model
src/adw-preferences-window.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/adw-preferences-window.c b/src/adw-preferences-window.c
index d68502de..8d81dd3a 100644
--- a/src/adw-preferences-window.c
+++ b/src/adw-preferences-window.c
@@ -455,6 +455,17 @@ adw_preferences_window_set_property (GObject *object,
}
}
+static void
+adw_preferences_window_dispose (GObject *object)
+{
+ AdwPreferencesWindow *self = ADW_PREFERENCES_WINDOW (object);
+ AdwPreferencesWindowPrivate *priv = adw_preferences_window_get_instance_private (self);
+
+ g_clear_object (&priv->filter_model);
+
+ G_OBJECT_CLASS (adw_preferences_window_parent_class)->dispose (object);
+}
+
static gboolean
search_open_cb (GtkWidget *widget,
GVariant *args,
@@ -501,6 +512,7 @@ adw_preferences_window_class_init (AdwPreferencesWindowClass *klass)
object_class->get_property = adw_preferences_window_get_property;
object_class->set_property = adw_preferences_window_set_property;
+ object_class->dispose = adw_preferences_window_dispose;
/**
* AdwViewStack:visible-page: (attributes org.gtk.Property.get=adw_preferences_window_get_visible_page
org.gtk.Property.set=adw_preferences_window_set_visible_page)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]