[glib/wip/gcleanup] threadpool-test: Fix leaks in tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] threadpool-test: Fix leaks in tests
- Date: Sat, 9 Nov 2013 19:58:57 +0000 (UTC)
commit 42ed477084e72f6c895f0e48428fc808b2eb7ae9
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:53:32 2013 +0100
threadpool-test: Fix leaks in tests
tests/threadpool-test.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tests/threadpool-test.c b/tests/threadpool-test.c
index 71f8a68..c640568 100644
--- a/tests/threadpool-test.c
+++ b/tests/threadpool-test.c
@@ -243,6 +243,12 @@ test_thread_sort_entry_func (gpointer data, gpointer user_data)
}
static void
+free_thread_pool (GThreadPool *pool)
+{
+ g_thread_pool_free (pool, FALSE, TRUE);
+}
+
+static void
test_thread_sort (gboolean sort)
{
GThreadPool *pool;
@@ -457,6 +463,8 @@ main (int argc, char *argv[])
main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);
+ g_main_loop_unref (main_loop);
+ g_thread_pool_free (idle_pool, FALSE, TRUE);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]