viewDidUnload and dealloc methods with ARC

In a nutshell:

1. you should rarely need a dealloc method. You do not have to (and indeed can’t) release¬†instance variables

2. and viewDidUnload is deprecated

From “Transitioning to ARC Release Notes”

“Custom dealloc methods in ARC do not require a call to [super dealloc] (it actually results in a compiler error). The chaining to super is automated and enforced by the compiler.

You create objects using alloc; the runtime takes care of deallocating objects.”

See also:


Leave a Reply

Your email address will not be published. Required fields are marked *