Today, I have update my xCode to 4.2 version, And I want to disable the ARC, I also search with the google. but can't fix my problem. According the search results, In the target setting, I can't find the 'Objective-C Automatic reference counting' item, So have no chance to set it to NO. I find the item one by one, and also use the search field.
And one know the newest Xcode4.2 ,how to disable the ARC for the project, not for the specific file.
Thanks very much.
Automatic Reference counting or ARC, is a form of garbage collection in which objects are deallocated once there are no more references to them, i.e. no other variable refers to the object in particular.
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.
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.
An essential concept in ARC is the retain count, which is a number that keeps track of how many objects are “holding onto” to another object. ARC only applies to reference types such as classes, and not to value types like structs. Value types are copied, so they don't work with references.
This is on Xcode 4.2 (Build 4D199).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With