[evolution-data-server] EDataBookView: Prefer g_clear_object() in dispose().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] EDataBookView: Prefer g_clear_object() in dispose().
- Date: Tue, 26 Mar 2013 18:20:16 +0000 (UTC)
commit 9fbbfa92d64d89d5777853dae910c484bb2a873d
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Mar 26 13:42:43 2013 -0400
EDataBookView: Prefer g_clear_object() in dispose().
addressbook/libedata-book/e-data-book-view.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book-view.c b/addressbook/libedata-book/e-data-book-view.c
index 3d8ec56..d6ca6f3 100644
--- a/addressbook/libedata-book/e-data-book-view.c
+++ b/addressbook/libedata-book/e-data-book-view.c
@@ -464,20 +464,9 @@ data_book_view_dispose (GObject *object)
priv = E_DATA_BOOK_VIEW_GET_PRIVATE (object);
- if (priv->connection != NULL) {
- g_object_unref (priv->connection);
- priv->connection = NULL;
- }
-
- if (priv->backend != NULL) {
- g_object_unref (priv->backend);
- priv->backend = 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]