Strong- A strong reference means we want to own that object we are referencing with property or variable. Any object assign to this property will not be destroyed as long as it is not assign to strong reference.
Weak - A weak reference is not for owning a object. Weak object only lives because one other object hold a strong reference property. Once that is not the case our weak property will destroy and will become nil.
This is the only reason why we have delegate properties as weak to avoid retain cycles and IBOutlets are weak because main controller holds the main view as strong.
0 Comment(s)