So say in my viewcontroller's .h file I have:
@interface MyViewController : UIViewController {
IBOutlet UILabel *myLabel;
IBOutlet UIView *myView;
IBOutlet UIImageView *myImageView;
IBOutlet UIButton *myButton;
NSNumber *myNumber;
NSString *myString;
NSMutableArray *myArray;
UILabel *myCurrentLabel;
SomeObject *myObject;
CGPoint myPoint;
}
... now in the viewcontroller's .c file
- (void)dealloc {
[myLabel release];
[myView release];
[myImageView release];
[myButton release];
[myNumber release]; // is this necessary?
[myString release]; // is this necessary?
[myArray release];
[myCurrentLabel release];
[myObject release];
// I don't need to release myPoint because it's a struct
[super dealloc];
}
Please see my comments in the .c file, I'm just wondering if my release statements are correct (and if not, why)...
Thank you!!