mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
gobject/tests: plug leaks
https://bugzilla.gnome.org/show_bug.cgi?id=682560
This commit is contained in:
parent
e0cba35d41
commit
03be681e08
@ -762,6 +762,9 @@ test_all_types (void)
|
||||
g_assert_cmpint (all_type_handlers_count, ==, 3 + 5 + 5);
|
||||
|
||||
g_object_unref (test);
|
||||
g_param_spec_unref (param);
|
||||
g_bytes_unref (bytes);
|
||||
g_variant_unref (var);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -114,12 +114,19 @@ tester_init_thread (gpointer data)
|
||||
static void
|
||||
test_threaded_class_init (void)
|
||||
{
|
||||
GThread *thread;
|
||||
|
||||
/* pause newly created threads */
|
||||
g_mutex_lock (&sync_mutex);
|
||||
|
||||
/* create threads */
|
||||
g_thread_create (tester_init_thread, (gpointer) my_tester0_get_type(), TRUE, NULL);
|
||||
g_thread_create (tester_init_thread, (gpointer) my_tester1_get_type(), TRUE, NULL);
|
||||
g_thread_create (tester_init_thread, (gpointer) my_tester2_get_type(), TRUE, NULL);
|
||||
thread = g_thread_create (tester_init_thread, (gpointer) my_tester0_get_type(), TRUE, NULL);
|
||||
g_thread_unref (thread);
|
||||
thread = g_thread_create (tester_init_thread, (gpointer) my_tester1_get_type(), TRUE, NULL);
|
||||
g_thread_unref (thread);
|
||||
thread = g_thread_create (tester_init_thread, (gpointer) my_tester2_get_type(), TRUE, NULL);
|
||||
g_thread_unref (thread);
|
||||
|
||||
/* execute threads */
|
||||
g_mutex_unlock (&sync_mutex);
|
||||
while (g_atomic_int_get (&mtsafe_call_counter) < (3 + 3 + 3 * 3) * NUM_COUNTER_INCREMENTS)
|
||||
|
Loading…
Reference in New Issue
Block a user