According to Apple’s documentation on the View Controller Lifecycle I noticed the following regarding the dealloc method:
Override this method only to perform any last-minute cleanup of your
view controller class. Objects stored in instance variables and
properties are automatically released; you do not need to release them
explicitly.
I’ve been taught always to call release on instance variables and properties that I own in my view controller’s dealloc method.
The only exception I was aware of is when using ARC but it does not mention ARC in this documentation.
Is this correct?
Since the guide you posted was updated recently, I’m pretty sure that it assumes you’re using ARC (you should do that, after all, if possible).
You’re correct, before ARC, you had to release your instance variables in the
deallocmethod (you can see that in the old XCode templates in thedeallocof the App-Delegate). With ARC, this gets handled automatically (as this guide says), so except for special needs, thedeallocmethod is not used anymore.