You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
340 B
C

#include "toydispatch/toydispatch.h"
static dispatch_queue_t garbage_queue;
__attribute__((constructor)) void static create_queue(void)
{
garbage_queue = dispatch_queue_create("ObjC deferred free queue", 0);
}
void objc_collect_garbage_data(void(*cleanup)(void*), void *garbage)
{
dispatch_async_f(garbage_queue, garbage, cleanup);
}