My Garbage Collector Simple garbage collector in C to manage dynamic memory allocations. Initialization Initialize the garbage collector: t_gc *gc; gc = gc_init(); Add to the garbage collector char *str = strdup("Hello, 42 !"); if (!str) { gc_clean(gc); return (1); } gc_add(gc, (void *)str); Clean Remove and free one: gc_remove_one(gc, (void *)str); Remove and free all: gc_clean(gc); Debug Print all allocations in the garbage collector: gc_print_debug(gc);