diff --git a/hash_table.c b/hash_table.c new file mode 100644 index 0000000..29e4924 --- /dev/null +++ b/hash_table.c @@ -0,0 +1,14 @@ +#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); +}