Refactor obj_free() in gc.c