Hacker News new | ask | show | jobs
by pzh 3554 days ago
Not necessarily. Swift uses ARC by default, and you'd really have to go out of your way to do any manual memory management.
1 comments

Ah. I originally talking about Objective-C, so I assumed that we were talking about manual memory management.

Of course, ARC has its own problems... Hope anybody implementing graphs knows what they're doing, or you'll leak memory like Niagra Falls.

Objective-C also uses ARC by default, and that's been the case for several years now. In any event, avoiding retain cycles is relatively straightforward and most iOS devs I know would agree that the low memory overhead and lack of GC pauses are worth the occasional extra effort of weak references.
I didn't know that Objective-C defaulted to ARC. Thanks for the information, and I am sorry for misrepresenting the language.