[gnome-builder] bufmgr: force dispose when releasing a buffer



commit 8488f8460eaeedfba56fcbd9aecd75cd8450b87c
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 12 17:06:44 2016 +0300

    bufmgr: force dispose when releasing a buffer
    
    When the buffer manager releases a buffer, we really do want to start
    cleaning things up if we can.
    
    This might result in us having to be more careful with adding holds
    before we do async work, but that is important to fixup anyway.

 libide/ide-buffer-manager.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-buffer-manager.c b/libide/ide-buffer-manager.c
index e5bc9ab..6a52ea8 100644
--- a/libide/ide-buffer-manager.c
+++ b/libide/ide-buffer-manager.c
@@ -404,6 +404,15 @@ ide_buffer_manager_remove_buffer (IdeBufferManager *self,
                                         G_CALLBACK (ide_buffer_manager_buffer_changed),
                                         self);
 
+  /* Try hard to ensure the buffer releases any objects held.
+   * That way, if for some reason the buffer does get leaked
+   * (which we see sometimes with GSV and have yet to track down),
+   * we at least drop all the related IDE objects.
+   *
+   * https://bugzilla.gnome.org/show_bug.cgi?id=766322
+   */
+  g_object_run_dispose (G_OBJECT (buffer));
+
   g_object_unref (buffer);
 
   EGG_COUNTER_DEC (registered);


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