[evolution] Remove a weak pointer when disposing EAttachmentHandler.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution] Remove a weak pointer when disposing EAttachmentHandler.
- Date: Fri, 19 Jun 2009 17:00:17 -0400 (EDT)
commit d492860ffe395d219cd79e5abff314061517ff45
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jun 19 16:58:10 2009 -0400
Remove a weak pointer when disposing EAttachmentHandler.
widgets/misc/e-attachment-handler.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/widgets/misc/e-attachment-handler.c b/widgets/misc/e-attachment-handler.c
index 0a6ed05..303fc33 100644
--- a/widgets/misc/e-attachment-handler.c
+++ b/widgets/misc/e-attachment-handler.c
@@ -91,6 +91,23 @@ attachment_handler_constructed (GObject *object)
}
static void
+attachment_handler_dispose (GObject *object)
+{
+ EAttachmentHandlerPrivate *priv;
+
+ priv = E_ATTACHMENT_HANDLER_GET_PRIVATE (object);
+
+ if (priv->view != NULL) {
+ g_object_remove_weak_pointer (
+ G_OBJECT (priv->view), &priv->view);
+ priv->view = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
attachment_handler_class_init (EAttachmentHandlerClass *class)
{
GObjectClass *object_class;
@@ -102,6 +119,7 @@ attachment_handler_class_init (EAttachmentHandlerClass *class)
object_class->set_property = attachment_handler_set_property;
object_class->get_property = attachment_handler_get_property;
object_class->constructed = attachment_handler_constructed;
+ object_class->dispose = attachment_handler_dispose;
g_object_class_install_property (
object_class,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]