3 ms·
Swift doesn't have a GC from what I know it has automatic reference counting. It's not really the same thing. It's on compile time and not at run time. It inje
by seivan 12y ago
Swift doesn't have a GC from what I know it has automatic reference counting.
It's not really the same thing.
It's on compile time and not at run time. It injects release/retain calls between acquiring ownership and relinquishing ownership.
I could be wrong but I don't think they added GC to Swift, as Objective-C (at least not on Mac OS) doesn't have it.
EDIT: They got rid of the GC on Mac OS as well. They use ARC there as well just like iOS.
- monkey_slap 12y agoCorrect, Swift uses reference counting in just the same way Objective-C did.
- mikeash 12y agoHe also says that Swift is bringing lambdas to iOS, when Objective-C has had lambdas for years and years now.