← Back to context

Comment by sage981

3 hours ago

Combining mark-sweep with refcounting is bold. Most small VMs just pick one.

If by "bold" you mean daft, then you are right :-)

Mark/Sweep GC is easy, well contained, and simple to test. RefCounting affects everything, obviously does not work for circular refs, and is an incredible pain to test/debug. While RefCounting gives you generally continuous smooth performance, it can stop the world if a particularly large/complex data structure is being collected. So all in all, I would skip RefCounting next time. (scScript does have a compile option to turn it off.)