As a newbie to the iOS, i need to know the main differences between ARC and Non-ARC. Am using X-Code 3.2, so need to know the main feature of ARC that distinguishes against non-ARC ? any help is appreciated. Thank you.
-
1See this http://en.wikipedia.org/wiki/Automatic_Reference_Counting - but as already was told to you, Xcode 3.2 is not able to use ARC. You'll need to upgrade. – Volker Mar 14 '14 at 10:30
-
1http://stackoverflow.com/questions/8760431/to-arc-or-not-to-arc-what-are-the-pros-and-cons – user2071152 Mar 14 '14 at 10:31
-
need to know if there are any issues if i use non-ARC! – sri hs Mar 14 '14 at 10:46
-
1As an aside you're not going to be able to submit apps built with that version of Xcode. Apple requires apps be built with the latest Xcode and optimised for iOS 7 https://developer.apple.com/news/index.php?id=12172013a#top – jackslash Mar 14 '14 at 10:49
-
ARC strives to generate "correct" code which also includes code running concurrently in a multi-threaded scenario. Getting this right for concurrent code is hard. Manual handled retains/releases is often not thread safe, due to optimistic assumptions, or simply due to not knowing the subtleties. If these assumptions are valid though, the manual handled code will usually have less retain/release pairs. – CouchDeveloper Mar 14 '14 at 11:00
2 Answers
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.
When using ARC there is no need for retain and release calls, and not only that in many cases ARC can provide a significant performance increase.
ARC is a feature of the new LLVM 3.0 compiler and it completely does away with the manual memory management that all iOS developers love to hate.
Using ARC in your own projects is extremely simple. You keep programming as usual, except that you no longer call retain, release and autorelease. That’s basically all there is to it.
My suggestion is to use ARC.
For your reference you can read this:-
http://clang.llvm.org/docs/AutomaticReferenceCounting.html
What are the pros and cons of using the ARC in an iOS project?
An ARC program's execution is nearly identical to well written MRC. That is, the behavioral differences are often undetectable because both the order of operations and performance are very close.
If you already know how to implement OS X or iOS apps with manual reference counting (MRC), ARC doesn't really add functionality -- it just allows you to remove reference counting operations from your sources.
If you don't want to learn MRC, then you may want to first try ARC. A lot of people struggle with, or try to ignore common practices of MRC (example: I've introduced a number of objc devs to the static analyzer). If you want to avoid those issues, ARC will allow you to postpone your understanding; you cannot write nontrivial objc programs without understanding reference counting and object lifetimes and relationships, whether MRC, ARC, or GC. ARC and GC simply remove the implementation from your sources and do the right thing in most cases. With ARC and GC, you will still need to give some guidance.
If the program you're developing has rather loose usage of reference counting (e.g. a typical amount of autoreleases), switching to ARC could really improve your program's execution times and peak memory usage.

- 3,084
- 2
- 28
- 65
The simple answer is that in non-ARC projects you have to control almost all memory operations (ownership, release time and etc.) by yourself. On the other hand, in ARC enabled projects most work done by system. More you can read via links that given in comments. If you are newbie then probably you should omit non-ARC projects by now and return later.

- 1,077
- 10
- 17
-
i know to work on non-ARC projects, wanted to know whether i face any problems regarding this. have a software issue to upgrade. so need to know the pros and cons of non-ARC projects. – sri hs Mar 14 '14 at 10:50