There is a similar question to this on SO here, however I just want to clarify something that wasn't fully explained there.
I understand that all delegates and outlets - in fact any reference to a "parent" object, to be a good citizen and think about the object graph for a minute - should be zeroing weak references. Due to the nature of zeroing weak pointers automatically dropping to nil on the referenced object's retain count reaching zero, does this mean that setting IBOutlets to nil in viewDidUnload
is now unnecessary?
So, if I declare my outlet like so:
@property (nonatomic, weak) IBOutlet UILabel *myLabel;
Does the following code have any effect?
- (void)viewDidUnload
{
self.myLabel = nil;
[super viewDidUnload];
}