Do I still need to set IBOutlet properties to null in viewDidUnload with ARC

iphone, objective-c

Solution

For IBOutlets marked as strong you still do want to nil them out in viewDidUnload.

Why:

When you receive a low memory notification any views not currently visible may unload themselves (calling viewDidUnload) to save memory. By nilling out your outlets you are giving up ownership and letting them be released. When the view is loaded again (when it is shown again), the outlets will be setup again and viewDidLoad will be called.

Problem

Do I still need to set IBOutlet properties to null in viewDidUnload with ARC? Because it still generates the following comment: // Release any retained subviews of the main view.

Original source

Related problems