[anjuta] libanjuta: Actually free stuff in AnjutaPkgConfigChooser::finalize.
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] libanjuta: Actually free stuff in AnjutaPkgConfigChooser::finalize.
- Date: Fri, 11 Jan 2013 22:23:31 +0000 (UTC)
commit 805b6143746fce3c2dd672af6b26dc725209935e
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Fri Dec 7 01:51:49 2012 +0100
libanjuta: Actually free stuff in AnjutaPkgConfigChooser::finalize.
https://bugzilla.gnome.org/show_bug.cgi?id=689054
libanjuta/anjuta-pkg-config-chooser.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/libanjuta/anjuta-pkg-config-chooser.c b/libanjuta/anjuta-pkg-config-chooser.c
index e9159a9..93130fb 100644
--- a/libanjuta/anjuta-pkg-config-chooser.c
+++ b/libanjuta/anjuta-pkg-config-chooser.c
@@ -133,9 +133,10 @@ on_listall_exit (AnjutaLauncher * launcher, int child_pid,
chooser->priv->scanning = FALSE;
anjuta_pkg_config_chooser_set_active_packages (chooser, chooser->priv->selected_cache);
- g_list_foreach (chooser->priv->selected_cache, (GFunc) g_free, NULL);
-
- g_object_unref (launcher);
+ g_list_free_full (chooser->priv->selected_cache, g_free);
+ chooser->priv->selected_cache = NULL;
+
+ g_clear_object (&chooser->priv->launcher);
}
static void
@@ -243,6 +244,16 @@ anjuta_pkg_config_chooser_init (AnjutaPkgConfigChooser *chooser)
static void
anjuta_pkg_config_chooser_finalize (GObject *object)
{
+ AnjutaPkgConfigChooser *chooser = ANJUTA_PKG_CONFIG_CHOOSER (object);
+
+ g_object_unref (chooser->priv->model);
+ g_object_unref (chooser->priv->filter_model);
+ g_object_unref (chooser->priv->sort_model);
+
+ if (chooser->priv->launcher)
+ g_object_unref (chooser->priv->launcher);
+
+ g_list_free_full (chooser->priv->selected_cache, g_free);
G_OBJECT_CLASS (anjuta_pkg_config_chooser_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]