[gobject-introspection] tests: Unref async result after adding to idle callback



commit e1bd35241ba6bd0815e0b044b112d1799e1154c9
Author: Simon Feltman <sfeltman src gnome org>
Date:   Thu Sep 11 15:02:40 2014 -0700

    tests: Unref async result after adding to idle callback
    
    g_simple_async_result_complete_in_idle() will add its own reference for
    managing the async result. We need to unref the result after calling this
    so we don't leak.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736517

 tests/scanner/regress.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 83175b0..b842e2f 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -3639,6 +3639,7 @@ regress_test_async_ready_callback (GAsyncReadyCallback callback)
   GSimpleAsyncResult *result = g_simple_async_result_new (NULL, callback, NULL,
     regress_test_async_ready_callback);
   g_simple_async_result_complete_in_idle (result);
+  g_object_unref (result);
   G_GNUC_END_IGNORE_DEPRECATIONS
 }
 


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