[evolution-data-server] EDataCalView: Prefer g_clear_object() in dispose().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] EDataCalView: Prefer g_clear_object() in dispose().
- Date: Tue, 26 Mar 2013 18:20:21 +0000 (UTC)
commit 876439e56373d7bf951b814e9dab0b001a284b2d
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Mar 26 13:43:37 2013 -0400
EDataCalView: Prefer g_clear_object() in dispose().
calendar/libedata-cal/e-data-cal-view.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c
index cd33210..ea9f129 100644
--- a/calendar/libedata-cal/e-data-cal-view.c
+++ b/calendar/libedata-cal/e-data-cal-view.c
@@ -418,20 +418,9 @@ data_cal_view_dispose (GObject *object)
priv = E_DATA_CAL_VIEW_GET_PRIVATE (object);
- if (priv->backend != NULL) {
- g_object_unref (priv->backend);
- priv->backend = NULL;
- }
-
- if (priv->connection != NULL) {
- g_object_unref (priv->connection);
- priv->connection = NULL;
- }
-
- if (priv->sexp != NULL) {
- g_object_unref (priv->sexp);
- priv->sexp = NULL;
- }
+ g_clear_object (&priv->connection);
+ g_clear_object (&priv->backend);
+ g_clear_object (&priv->sexp);
g_mutex_lock (&priv->pending_mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]