[gnome-calendar] manager: free clients' hash-table with g_free
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: free clients' hash-table with g_free
- Date: Thu, 4 Dec 2014 22:38:24 +0000 (UTC)
commit 4c0938e5cbdc7215f3b04f93e42c4acc1004d8f7
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Mon Oct 20 15:00:59 2014 -0400
manager: free clients' hash-table with g_free
Since ECalDataModel keeps a ref to the connected EClients there's no
need of keeping another and using a custom free function for clients' hash
src/gcal-manager.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index 4075177..f280d41 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -90,8 +90,6 @@ enum
static guint signals[LAST_SIGNAL];
-void free_manager_unit_data (gpointer data);
-
static void load_source (GcalManager *manager,
ESource *source);
@@ -201,18 +199,6 @@ submit_thread_job (EThreadJobFunc func,
}
/* -- end: threading related code provided by Milan Crha -- */
-void
-free_manager_unit_data (gpointer data)
-{
- GcalManagerUnit *unit;
-
- unit = (GcalManagerUnit*) data;
-
- g_clear_object (&(unit->client));
-
- g_free (unit);
-}
-
/**
* load_source:
* @manager: Manager instance
@@ -468,6 +454,9 @@ gcal_manager_finalize (GObject *object)
if (priv->final_date != NULL)
g_free (priv->final_date);
+ if (priv->e_data_model != NULL)
+ g_object_unref (priv->e_data_model);
+
g_hash_table_destroy (priv->clients);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]