[glib/wip/gcleanup] threadpool-test: Cleanup memory in test
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] threadpool-test: Cleanup memory in test
- Date: Sat, 9 Nov 2013 19:59:02 +0000 (UTC)
commit ac1b02a6435a050c13dc854050c65b531be4870c
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:53:48 2013 +0100
threadpool-test: Cleanup memory in test
tests/threadpool-test.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/tests/threadpool-test.c b/tests/threadpool-test.c
index c640568..f38b75a 100644
--- a/tests/threadpool-test.c
+++ b/tests/threadpool-test.c
@@ -1,3 +1,4 @@
+#define G_CLEANUP_SCOPE test
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
@@ -301,6 +302,7 @@ test_thread_sort (gboolean sort)
g_assert (g_thread_pool_get_max_threads (pool) == max_threads);
g_assert (g_thread_pool_get_num_threads (pool) == g_thread_pool_get_max_threads (pool));
+ G_CLEANUP (pool, free_thread_pool);
}
static void
@@ -455,6 +457,8 @@ test_check_start_and_stop (gpointer user_data)
return continue_timeout;
}
+G_CLEANUP_DEFINE (test);
+
int
main (int argc, char *argv[])
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]