I know there have been numerous write ups on 'strong' vs. 'weak'. But all docs says that both are 100% synonyms for each other and you can use 'strong' in replace of 'retain', and vice versa.
My question is: if they are same, why did Apple introduce the new 'strong' keyword? I have tested both in a sample project, and both the 'strong' and 'retain' property attributes appear to do the same thing. Don't you think that if Apple introduced the 'strong' attribute, it should disallow the use of 'retain' attribute? Or am I missing something?
strong
andretain
are pretty much the same, but because in ARC you don't need to worry about retaining-releasing objects, thestrong
is logically much more proper for a property in ARC... like in MRR theretain
has the opposite equivalent asrelease
orautorelease
, in ARC environment thestrong
has no such opposite equivalent, this is why logically more correct to use thestrong
instead of theretain
in ARC; if that makes sense to you. – holex