Let's say I programmatically create a UILabel and then add it as a subview to the main view of my own UIViewController's subclass. I also want to store a reference to it at the class level of my view controller so I can use it later. Should I make it a weak reference? And more importantly why?
I see people do this all the time, and I don't understand it. I thought the point of a weak reference was to avoid a retain cycle, but there's no retain cycle here.
I certainly see this all over code where people use storyboards/nibs (which I've never tried to use so I understand at only a very basic level) but even there I don't understand why weak references would be appropriate. There's no retain cycle there either, right?