This is something I have been curious about:
If you create a new UIViewController subclass in Xcode, they stub in a few functions including ViewDidUnload. But there is no dealloc method.
Why wouldn'开发者_JAVA技巧t they stub that method into the class?
You can create your own templates for Xcode. If you want to add a dealloc
method to your template, go for it.
Look in ~/Library/Application Support/Apple/Developer Tools/Templates/
.
I think that's a reasonable question - it would seem including it would make sense, given there's a high liklihood that it would be used. But I suppose the only answer which is possible here, is that they decided not to (for whatever reason). You can of course add it yourself - and in iOS5 it may be fairly redundant with ARC.
精彩评论