Comment on Rewriting in RustparentComments−ghusbands23dRefcounting is indeed a form of GC (and the languages that want to handle cycles then need an extra form of GC on top of it).−frollogaston22dGC specifically means you leave unreferenced mem on the heap until it gets collected in one big sweep later.−ghusbands9dYou're referring specifically to tracing garbage collection. When a reference count reaches zero, that garbage is collected, often recursively. Among programming language designers, ARC is considered a GC strategy.https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...https://users.rust-lang.org/t/reference-counting-garbage-col...
Comments
Refcounting is indeed a form of GC (and the languages that want to handle cycles then need an extra form of GC on top of it).
GC specifically means you leave unreferenced mem on the heap until it gets collected in one big sweep later.
You're referring specifically to tracing garbage collection. When a reference count reaches zero, that garbage is collected, often recursively. Among programming language designers, ARC is considered a GC strategy.
https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...
https://users.rust-lang.org/t/reference-counting-garbage-col...