[evolution] EMemoShellView: Use g_clear_object() in dispose().



commit d107894a439a43020ffad2763c39f792c8a989df
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Feb 15 19:51:39 2013 -0500

    EMemoShellView: Use g_clear_object() in dispose().

 modules/calendar/e-memo-shell-view-private.c |    6 +++---
 modules/calendar/e-memo-shell-view-private.h |    6 ------
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index d881c8c..d634c1e8 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -293,9 +293,9 @@ e_memo_shell_view_private_dispose (EMemoShellView *memo_shell_view)
 {
        EMemoShellViewPrivate *priv = memo_shell_view->priv;
 
-       DISPOSE (priv->memo_shell_backend);
-       DISPOSE (priv->memo_shell_content);
-       DISPOSE (priv->memo_shell_sidebar);
+       g_clear_object (&priv->memo_shell_backend);
+       g_clear_object (&priv->memo_shell_content);
+       g_clear_object (&priv->memo_shell_sidebar);
 
        if (memo_shell_view->priv->activity != NULL) {
                /* XXX Activity is not cancellable. */
diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h
index 0e0a2da..87c8ee1 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -51,12 +51,6 @@
 #define ACTION_GROUP(name) \
        (E_SHELL_WINDOW_ACTION_GROUP_##name (shell_window))
 
-/* For use in dispose() methods. */
-#define DISPOSE(obj) \
-       G_STMT_START { \
-       if ((obj) != NULL) { g_object_unref (obj); (obj) = NULL; } \
-       } G_STMT_END
-
 /* ETable Specifications */
 #define ETSPEC_FILENAME                "e-memo-table.etspec"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]