To be simple, you use "weak property" and or "weak variable" for following:
- You do not want to take the ownership of object. Like delegate/dataSource are generally declared weak.
- You may say you can also use "assign" instead of "weak". When the variable is freed from memory, using "weak" automatically sets it to nil, whereas "assign" now is referring to deallocated instance and code can crash if you try to do something on it.
- To avoid retain cycles causing memory leaks. For example avoid passing "self" in blocks. use "__weak id weakSelf = self", and now pass weakSelf in blocks.
ARC is your friend, but can do potential harm if not taken care of things mentioned above.