Skip to content

Commit 24ee254

Browse files
committedFeb 21, 2019
Run tests on an autoreleasepool
1 parent 16efd61 commit 24ee254

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed
 

‎test/runner.m

+9-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ static gboolean store_path_of_test_runner (const GumModuleDetails * details,
2222
gint result;
2323
GumExceptor * exceptor;
2424
GumScriptBackend * v8_backend = NULL;
25-
GTimer * timer;
2625
gdouble t;
2726

2827
gum_init_embedded ();
@@ -56,10 +55,15 @@ static gboolean store_path_of_test_runner (const GumModuleDetails * details,
5655

5756
RUN_SUITE (basics);
5857

59-
timer = g_timer_new ();
60-
result = g_test_run ();
61-
t = g_timer_elapsed (timer, NULL);
62-
g_timer_destroy (timer);
58+
@autoreleasepool
59+
{
60+
GTimer * timer = g_timer_new ();
61+
62+
result = g_test_run ();
63+
64+
t = g_timer_elapsed (timer, NULL);
65+
g_timer_destroy (timer);
66+
}
6367

6468
g_print ("\nRan %d test%s in %.2f seconds\n",
6569
num_tests_run,

0 commit comments

Comments
 (0)
Please sign in to comment.