4 ms·
> Android uses garbage collection. iOS uses ref-counting. I hope you meant to say "Dart uses GC, Swift uses ref-counting". > On a mobile platform, IMHO ref-co
by sjindel 9y ago
> Android uses garbage collection. iOS uses ref-counting.
I hope you meant to say "Dart uses GC, Swift uses ref-counting".
> On a mobile platform, IMHO ref-counting is clearly superior and is a competitive avantage for iOS.
Reference counting can also cause pauses since decrementing a single reference can cause a arbitrarily large set of objects to be simultaneously deallocated.
Dart's GC performs memory compaction and allocations are performed by bumping a pointer in the new space. Swift's allocations are much slower since they comb a free-list and it has no facility for compaction.