Reputation: 1165
my question is basically the title. In XCode with Automatic Reference Counting turned on, will I ever need to manage memory manually? Like calling release, retain, etc?
Thanks!
Upvotes: 1
Views: 109
Reputation: 100632
ARC handles only Objective-C objects. So you'll need to continue manually to manage Core Foundation and plain C memory.
Although you shouldn't need manually to retain or release you're also still in charge of preventing retain cycles — ensuring you flag appropriate properties as strong and weak. So you'll need to continue to consider at least that aspect of ownership.
Beyond that there's at least one very specific quirk — you'll need to remember to copy blocks if the stack is going to unwind underneath them. That's to ensure they end up on the heap rather than the stack so is memory management related.
Upvotes: 5