Quote:
Originally Posted by imtz
I noticed that when creating a new 'View-based application' the viewController.h file now looks like this
Code:
// Created by, Copyright, etc.
#import <UIKit/UIKit.h>
@interface test1ViewController : UIViewController
@end
and no longer has the {} by default. Also, the .m file no longer has the dealloc method by default. Is this a bug, is it on purpose? If this is on purpose, what is the reason for it?
|
I noticed the same thing. My application started crashing when I moved from one view controller back to the original view controller. I banged my head on it for five hours before I decided to build my 3-file set from scratch and copy over my code. That's when I noticed what you posted about the missing { characters and the missing dealloc method.
In my newly re-created h and m files, I didn't include my dealloc during testing and now I have no more crashing.
The moment I re-add the dealloc method, though, it starts crashing again. So I moved everything from dealloc into my viewDidUnload method since that's what instruments told me when I checked for the memory leaks I knew I was going to have. Now it cleanly unloads my memory usage, no more leaks and no more crashing.