[gnome-builder] editor-view: release document aggressively



commit 3df8b79d70f465bc0fac7b75b6d6e2cac2ed3813
Author: Christian Hergert <christian hergert me>
Date:   Thu Sep 17 04:14:17 2015 -0700

    editor-view: release document aggressively

 src/editor/gb-editor-view.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index 852353c..13343aa 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -577,6 +577,16 @@ gb_editor_view_constructed (GObject *object)
 }
 
 static void
+gb_editor_view_destroy (GtkWidget *widget)
+{
+  GbEditorView *self = (GbEditorView *)widget;
+
+  GTK_WIDGET_CLASS (gb_editor_view_parent_class)->destroy (widget);
+
+  g_clear_object (&self->document);
+}
+
+static void
 gb_editor_view_finalize (GObject *object)
 {
   GbEditorView *self = (GbEditorView *)object;
@@ -639,6 +649,7 @@ gb_editor_view_class_init (GbEditorViewClass *klass)
   object_class->get_property = gb_editor_view_get_property;
   object_class->set_property = gb_editor_view_set_property;
 
+  widget_class->destroy = gb_editor_view_destroy;
   widget_class->grab_focus = gb_editor_view_grab_focus;
   widget_class->get_request_mode = gb_editor_view_get_request_mode;
   widget_class->get_preferred_height = gb_editor_view_get_preferred_height;


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