Valgrind reports "still reachable" after g_thread_pool_new/free
I am using the attached simple C program to test g_thread_pool_new
and g_thread_pool_free
Valgrind reports the following "still reachable":
==30270== 64 bytes in 1 blocks are still reachable in loss record 11 of 16
==30270== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30270== by 0x4E91D08: g_malloc (gmem.c:106)
==30270== by 0x4E5D392: g_async_queue_new_full (gasyncqueue.c:141)
==30270== by 0x4EB68F4: g_thread_pool_new (gthreadpool.c:582)
==30270== by 0x1087B1: main (in /home/stefan/a.out)
Probably g_async_queue_unref(unused_thread_queue);
needs to be called in g_thread_pool_free
. However, I didn't manage to get it done right.glib_test.c