[evolution] ECalShellView: Use g_clear_object() in dispose().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] ECalShellView: Use g_clear_object() in dispose().
- Date: Sat, 16 Feb 2013 02:06:01 +0000 (UTC)
commit 2ebfd1d525cac225a61f743a295fd94266095e6a
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Feb 15 19:50:28 2013 -0500
ECalShellView: Use g_clear_object() in dispose().
modules/calendar/e-cal-shell-view-private.c | 6 +++---
modules/calendar/e-cal-shell-view-private.h | 6 ------
2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index f22b8ee..5678daa 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -742,9 +742,9 @@ e_cal_shell_view_private_dispose (ECalShellView *cal_shell_view)
if (priv->cal_shell_content != NULL)
e_cal_shell_content_save_state (priv->cal_shell_content);
- DISPOSE (priv->cal_shell_backend);
- DISPOSE (priv->cal_shell_content);
- DISPOSE (priv->cal_shell_sidebar);
+ g_clear_object (&priv->cal_shell_backend);
+ g_clear_object (&priv->cal_shell_content);
+ g_clear_object (&priv->cal_shell_sidebar);
if (priv->calendar_activity != NULL) {
/* XXX Activity is not cancellable. */
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index b589907..a2dd1c3 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -62,12 +62,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-calendar-table.etspec"
#define CHECK_NB 5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]