j'ai un Memory leak Method returns an objective-C obbject with a +1
Bonjour
je suis entrain de déboguer mon application et j'ai un Memory leak dans la ligne en rouge
Method returns an objective-C obbject with a +1 retain count(owning reference)
->Object allocated on line 201 is no longer referenced after this point and has a retain count of +1(object leaked)
j'utilise la classe XMLToObjectParser
http://www.ipup.fr/page.php?id=332
Voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
- (void)viewDidLoad {
tableau = [[NSMutableArray alloc] init];
NSURL *url = [NSURL URLWithString: @"http://www.site.com/feed.xml"];
XMLToObjectParser *myParser = [[XMLToObjectParser alloc] parseXMLAtURL:url toObject:@"eventLoc" andDenominator:@"eventLoc" parseError:nil];
for(int i = 0; i < [[myParser items] count]; i++) {
//eventLoc *new = [[eventLoc alloc] init];
eventLoc *new = (eventLoc *)[[myParser items] objectAtIndex:i];
[tableau addObject:new];
}
//[myParser release];
[super viewDidLoad];
} |
je ne sais pas vraiment comment résoudre ce memory leak
Merci d'avance pour votre m'aider