My app is running good and looks ok. But after I ran it with Instruments, I found tons of leaks on it. There are several things seems not wrong like a code below. Is the code really have problems? Any single word will be helpful to me.
@interface GameData : NSObject
{
NSDictionary* _data;
NSDictionary* _localData;
}
@end
@implementation GameData
- (id) init
{
NSString* dataFilename = [[NSBundle mainBundle]pathForResource:@"GameData" ofType:@"plist"];
_data = [[NSDictionary alloc]initWithContentsOfFile:dataFilename]; // Leaks 48 bytes
NSString* localDataFilename = [[NSBundle mainBundle]pathForResource:@"GameData-Local" ofType:@"plist"];
_localData = [[NSDictionary alloc]initWithContentsOfFile:localDataFilename];
return self;
}
- (void) dealloc
{
[_data release];
[_localData release];
[super dealloc];
}
@end