Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable/disable ARC in an xcode project?

If a project has already been created with ARC disabled, how do I enable it and vice versa?

like image 210
hollow7 Avatar asked Jan 26 '12 12:01

hollow7


People also ask

What is ARC in IOS development?

Swift uses Automatic Reference Counting (ARC) to track and manage your app's memory usage. In most cases, this means that memory management “just works” in Swift, and you don't need to think about memory management yourself.

Does Objective-C support ARC?

Automatic Reference Counting (ARC) is a memory management option for Objective-C provided by the Clang compiler. When compiling Objective-C code with ARC enabled, the compiler will effectively retain, release, or autorelease where appropriate to ensure the object's lifetime extends through, at least, its last use.


1 Answers

Open your project and select Edit -> Refactor -> Convert to Objective-C ARC. This will start checking your code if it is ready for the conversion.

See also Clang documentation: Objective-C Automatic Reference Counting (ARC)

How to disable ARC has been answered here

like image 72
Morothar Avatar answered Sep 28 '22 00:09

Morothar