Hey, I've been wokring through my app and removing the memory leaks but the below one has me beaten, any help would be much appreciated.
NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[dateFormatter setDateFormat:@"dd/MM/yyyy"];
claim.date = [dateFormatter dateFromString:[data objectForKey:key]];
[dateFormatter release];
The date property is defined as:
@property (nonatomic, retain) NSDate *date
Thanks
Edit:
Forgot to mention where the memory leak occurred, its on line claim.date = [dateFo开发者_开发技巧rmatter dateFromString:[data objectForKey:key]];
I suspect one or both of the following:
- The owner of
claimnever released it - The implementation of
claimdoes not send the release message todatein itsdeallocand/or does notself.date = nilin theviewDidUnload.
加载中,请稍侯......
精彩评论