mono_gc_reference_queue_new (mono_reference_queue_callback callback)
{
	MonoReferenceQueue *res = g_new0 (MonoReferenceQueue, 1);
	res->callback = callback;

	EnterCriticalSection (&reference_queue_mutex);
	res->next = ref_queues;
	ref_queues = res;
	LeaveCriticalSection (&reference_queue_mutex);

	return res;
}
Weaknesses in this category are related to improper management of system resources.