4. Doesn’t change how memory
management works, it only changes
what you do as a programmer
Preventing you from remembering
when to use release, retain, autorelease,
but automatically inserts appropriate
memory management calls for you at
compile time. The compiler also
generates appropriate dealloc methods
for you
5. Xcode provides a tool that automates the mechanical parts of the
ARC conversion (such as removing retain and release calls) and
helps you to fix issues the migrator can’t handle automatically
(choose Edit > Refactor > Convert to Objective-C ARC)
6. Go to Target =>Build Phases => Compile Sources in Xcode.
Select desired files
PRESS ENTER
Type -fno-objc-arc
Press Enter or Done
7. Strong (similar to retain)
By default all instance variables and local variables are strong
pointers.
Strong pointers are “owners” that keep objects alive. (strong =
live)
Weak
Weak pointers are not owners and do not keep objects alive.
(weak = die).
It is similar to assign but when the object is deallocated, the
property value is set to nil instead of remaining as a dangling
pointer.
12. If you are making an outlet to a subview of the
ViewControllers subview it should be weak. The object
exists as long as the top view exists (between
viewDidLoad and viewDidUnload). But maybe you
want to create another object in your nib file or
StoryBoard (a model object). As this object is not under
the view hierarchy, you need to make the iboutlet
strong.
A weak qualifier is especially used in a parent child
object relationship, where the parent has a strong
reference to a child object. And the child object
a weak reference back to parent otherwise you will end
up creating a circular reference(e.g. the parent retains
the child and the child retains the parent so neither is
ever released).