[gnome-builder] tests: ensure we release tests immediately



commit 7dacd7bfb30156732643adef03e91e8d5bcbdc59
Author: Christian Hergert <chergert redhat com>
Date:   Sat Dec 16 23:53:09 2017 -0800

    tests: ensure we release tests immediately
    
    We want to clear the tree store in case something holds onto a
    reference. Just extra defensive to ensure things are released.

 src/libide/testing/ide-test-manager.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/libide/testing/ide-test-manager.c b/src/libide/testing/ide-test-manager.c
index 4717f7d..ce94467 100644
--- a/src/libide/testing/ide-test-manager.c
+++ b/src/libide/testing/ide-test-manager.c
@@ -107,8 +107,13 @@ ide_test_manager_dispose (GObject *object)
 {
   IdeTestManager *self = (IdeTestManager *)object;
 
+  if (self->tests_store != NULL)
+    {
+      gtk_tree_store_clear (self->tests_store);
+      g_clear_object (&self->tests_store);
+    }
+
   g_clear_object (&self->providers);
-  g_clear_object (&self->tests_store);
   g_clear_pointer (&self->tests_by_provider, g_ptr_array_unref);
 
   G_OBJECT_CLASS (ide_test_manager_parent_class)->dispose (object);


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