4 ms·
I believe the idea was that reference counting was more memory efficient than other forms of garbage collection, such as copy collectors and mark and sweep coll
by dwaite 6y ago
I believe the idea was that reference counting was more memory efficient than other forms of garbage collection, such as copy collectors and mark and sweep collectors which commonly make up generational garbage collectors.
Languages like Java also do not yet support stack-allocated value types outside a few primitives like integers, and heap allocations are both slower and less space efficient due to the indirection and memory management.
- jhgb 6y agoYou do get stack-allocated value types in languages like Go or C#, though, so these shouldn't be subject to the same limitations that Java is.