Feature Request
It would be nice if we could convert Titanium Mobile codebase for iOS to use ARC.
{quote}
Automatic Reference Counting (ARC) for Objective-C makes memory management the job of the compiler. By enabling ARC with the new Apple LLVM compiler, you will never need to type retain or release again, dramatically simplifying the development process, while reducing crashes and memory leaks. The compiler has a complete understanding of your objects, and releases each object the instant it is no longer used, so apps run as fast as ever, with predictable, smooth performance.
{quote}
Transitioning to ARC Release Notes
Automatic Reference Counting (ARC) is a compiler feature that provides automatic memory management of Objective-C objects. Rather than having to think about retain and release operations, ARC allows you to concentrate on the interesting code, the object graphs, and the relationships between objects in your application.
!ARC_Illustration.jpg|thumbnail!
Apple docs: [here](
https://developer.apple.com/library/ios/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html).
Yes, valid. Though we need to scope it.
A quick scan suggests that there are hundreds of quick fixes to remove 'autorelease' and RELEASE_TO_NIL references. After that, there seem to be some issues that probably will take longer to test/fix, but nothing really hard stands out to me.
I'm guessing some JIRA issues will automagically be fixed once we update to ARC, and lots of future issues prevented. Well worth the effort.
Can I just check that an assessment of impact on pre-existing 3rd party ios modules has been done. I don't know enough about the Ti build chain, but just wanted to make sure this had been thought about. Thanks
[~ndastur] Is your concern that a 3rd party module would need to be updated in order to continue working with a ARC-converted SDK?
Yes. And support for various modules varies so it might have quite an impact. It might be that as modules are compiled into a static library it doesn't matter and xcode will happily link. I think the option to use arc or not occurs at the source build level
I guess not using ARC is not an option anymore :) https://developer.apple.com/news/?id=02202015a
The announcement from Apple pertains to Mac OS X apps, not iOS apps. Still, it probably indicates what Apple will require for iOS apps in the future. Thanks for making us aware of the new policy.
Whoops, you're right, I missed to notice that. And yeah, it's good indicate it'll come to iOS too. Cheers.
This should not be a difficult ticket, most of the changes are fairly mechanical to do. It will magically fix many existing bugs, I'm sure.... e.g. the example above with the nav buttons.