Apple Says Mac Developers Must Transition to ARC Memory Management by May
In an announcement posted to Apple’s developer portal today, the company notified all Mac developers that any submissions to the Mac App Store after May 1 must use their Automatic Reference Counting (ARC) memory management feature.
“Beginning May 1, 2015, new Mac apps and app updates submitted to the Mac App Store may no longer use garbage collection, which was deprecated in OS X Mountain Lion. Instead, migrate your apps to Automatic Reference Counting, using the migration assistant in Xcode to help with this transition. Apps may continue to use retain/release for manual memory management.”
Any app updates or new Mac apps may no longer use garbage collection, which was deprecated in OS X Mountain Lion. For those who are unsure, garbage collection is the process of automatically deciding (for each block of memory) whether the program will use a given block of memory anymore. If the garbage collector decides the program doesn’t need the block of memory, then it is freed which gives the memory resources back to the system.
Replacing the tradition garbage collection is something Apple calls ARC, which is still technically garbage collection. However, Apple’s new method is a lot more efficient then traditional implementations of garbage collection.
ARC is a complier feature that provides automatic memory management (garbage collection) in Objective-C. Developers no longer have to think about retain and release (allocate and deallocating memory) operations in their code. Instead, developers can now concentrate on the code that is central to their application.
As you can see from the image above, ARC dramatically decreases the time it takes for the compiler to produce the correct code.
If you are a Mac developer or you are interested in learning about ARC in further detail, be sure to read Apple’s full guide on transitioning to ARC.