Hi All! Assist me please, is this code correct? I mean, do we really need a dealloc method in this class, and why do or don't we? Will be a memory leak if we don't use dealloc here? Thanx!
#import <Foundation/Foundation.h>
@interface MyData : NSObject
{
@private
NSString *name;
NSString *surname;
NSString *email;
NSString *telephone;
UIImage *image;
}
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSString *surname;
@property (nonatomic, retain) NSString *email;
@property (nonatomic, retain) NSString *telephone;
@property (nonatomic, retain) UIImage *image;
@end
#import "MyData.h"
@implementation MyData
@synthesize name;
@synthesize surname;
@synthesize email;
@synthesize telephone;
@synthesize image;
- (void) dealloc
{
[name release];
[surname release];
[email release];
[telephone release];
[image release];
[super dealloc];
}
@end