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
Starting from iOS 5 and OS X 10.7, weak
will produce an automatic zeroing pointer. This means that when the pointed object is release, the pointer is automagically set to nil
(for details see Zeroing Weak References in ARC).
So, under iOS 5+ and OS X 10.7+, it is not useful to set the weak
IBOutlet
properties to nil
manually in the viewDidUnload
method: when the main view is unloaded, all its subviews will be released, so the related properties are set to nil
.