Developers are told to move garbage collection to Automatic Reference Counting using the migration assistant in Xcode

Feb 23, 2015 14:27 GMT  ·  By

Apple has issued a memo on its Developer portal informing Mac coders that, starting May 1, garbage collection - a mechanism for optimizing and deallocating memory - is being deprecated.

Per the announcement, “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.”

This doesn’t necessarily cripple existing apps, but it does require the makers to migrate their apps to Automatic Reference Counting. In order to do so, Apple puts the migration assistant in Xcode at their disposal.

A compiler feature that provides automatic memory management of objects coded in Objective-C, Automatic Reference Counting (ARC) allows coders to focus on the code that makes stuff work, object graphs, and the ties between objects, rather than retain and release operations.

Apple even offers a comprehensive visual example of how ARC benefits app development (photo above). Before sending readers off to the release notes, the Cupertino company points out that all existing apps may continue to use retain/release for manual memory management.

The full documentation over at the iOS Developer Library contains a Summary, an Overview, various examples of code being transitioned to ARC, information on managing autorelease pools, patterns for managing outlets across platforms, and new rules and qualifiers enforced by ARC, among other things.