Remix.run Logo
cyberax 2 days ago

A free()-d object that is NOT garbage-collected during the next collection is a bug in itself.

pizlonator 2 days ago | parent | next [-]

The Fil-C GC will only GC a free'd object if it succeeds at repointing all capabilities to it to point at the free singleton instead.

Don't worry, it's totally sound.

thomasmg 2 days ago | parent | prev [-]

I'm not sure what you mean. Do you mean there is a bug _in the garbage collection algorithm_, if the object is not freed in the very next garbage collection cycle? Well, it depends: the garbage collection could defers collection of some objects until memory is low. Multi-generation garbage collection algorithm often do this.

cyberax a day ago | parent [-]

You can defer the actual freeing of the object until at least one GC pass finishes. Then alert if any of them are still reachable.