2 ms·
> Unlike in Go or Swift, it won't be used on all objects, but only on the small percentage that couldn't be handled by autofree. Swift also has value types, an
by slavapestov 6y ago
> Unlike in Go or Swift, it won't be used on all objects, but only on the small percentage that couldn't be handled by autofree.
Swift also has value types, and optimization passes to promote heap-allocated objects and closures to the stack where possible using escape analysis.
- azakai 6y agoSimilar in Go as well: Many things are by value, and it does escape analysis too, allowing a lot of things to not require the GC.