views:

45

answers:

2

Let's say i have a navigation controller in my app delegate. Why is it necessary to release it on dealloc method in my appDelegate? When the dealloc method of my appDelegate is called, it means user is exiting the app, so the leak doesn't affect my application.

So why would i release anything in dealloc method of my appDelegate?

+2  A: 

It's not necessary. Might even be cheaper to skip it and just let the OS free up the process.

Unless any objects of yours do anything useful in their dealloc, like saving data.

Graham Perks
Thanks, I asked the question because i was wondering if the leak slows down the OS or not, good to know that leaks withing an application don't affect the OS. or other apps.
aryaxt
A: 

It's good practice :)

Matt Williamson