Fix potential bug with recursing too many times duing gc
This commit is contained in:
@ -144,6 +144,9 @@ int main(int argc, const char **argv) {
|
||||
assert(refcount_context_garbage_collect(c) == 0);
|
||||
assert(refcount_context_num_refs(c, a_with_destructor) == 1);
|
||||
assert(refcount_context_remove_destructor(c, a_with_destructor, &key));
|
||||
assert(refcount_context_ref(c, a_with_destructor));
|
||||
assert(refcount_context_garbage_collect(c) == 0);
|
||||
assert(refcount_context_unref(c, a_with_destructor));
|
||||
assert(!refcount_context_is_doing_gc(c));
|
||||
ctx_and_flag.should_be_doing_gc = true;
|
||||
assert(refcount_context_garbage_collect(c) == 26);
|
||||
|
Reference in New Issue
Block a user