Thursday, 20 February 2014

iPhone Development:Disable ARC for a single file in a project in iPhone SDK




Automatic reference counting (ARC) was introduced in the iOS 5 sdk to free Objective-C programmers from having to handle memory management by making memory management the job of the compiler.
Though you can disable ARC for a certain files in your project.You can use flag -fno-objc-arc for those files.
To add this flag to certain files follow the given below steps
Step 1:Select your target.
Step 2:Now on the right hand side select Build Phases.
Step 3: Now select  compiler flags.
Step 4: Here select the files for which you want to disable ARC.Double click it, a box will open up. In that box add the flag -fno-objc-arc.

 Image:


No comments:
Write comments