Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

if convert project to Automatic Reference Counting(ARC), Is it still support on iOS 3.X, 4.X?

i not sure about convert project to Automatic Reference Counting(ARC). it still support on iOS 4.X or lower ?

thank you

like image 413
RAGOpoR Avatar asked Jun 21 '11 07:06

RAGOpoR


People also ask

What is automatic reference counting in IOS?

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.

How does Automatic reference Counting work?

Automatic Reference Counting manages object life cycles by keeping track of all valid references to an object with an internal retain count. Once all references to an object go out of scope or are cleared, and the retain count thus reaches zero, the object and its underlying memory is automatically freed.

How do I turn off ARC in Xcode?

You can disable ARC for a specific class using the -fno-objc-arc compiler flag for that class. In Xcode, in the target Build Phases tab, open the Compile Sources group to reveal the source file list. Double-click the file for which you want to set the flag, enter -fno-objc-arc in the pop-up panel, then click Done.

What is memory management in iOS Swift?

In Swift, memory management is handled by Automatic Reference Counting (ARC). Whenever you create a new instance of a class ARC allocates a chunk of memory to store information about the type of instance and values of stored properties of that instance.


1 Answers

From what I can gather yes - ARC is done by the compiler and should be thought of as a wizard or helper that checks all of your code and inserts the correct retain and release statements for you.

This will therefore be compatible with older iOS runtimes.

Edit:

IT will support 4.x but not 3.x

like image 141
Grouchal Avatar answered Sep 21 '22 06:09

Grouchal