CabForward/iOS-on-Rails — Issue #6: Delegate dealloc Method
Author: perfectionist
Created: 2011-12-14 15:45:09+00:00
State: open

This is another style question. The delegate classes are almost always never deallocated. (Conway and Hillegass page 86). Therefore there is no need for a `dealloc` method and the instance variables don't need to have `autorelease`.

So if we know it doesn't get deallocated then it would be better not to define the `dealloc` method.

I tested `AppDelegate` by putting `NSLog` in the `dealloc` method, ran and stopped the app and sure enough `dealloc` was not called.

Conway and Hillegass do say - if in doubt it does not hurt to put in `dealloc` method.