1
나는 계기를 사용하여 메모리 누출을 발견하고 많은 것을 발견했습니다! 그러나 문제를 해결하는 방법을 모르겠습니다. wycategories
가 retain
속성이 있기 때문에NSMutableArray 루프 누수
@property(nonatomic, retain) NSMutableArray *wycategories;
...
...
self.wycategories = [[NSMutableArray alloc]init];
...
...
for (CXMLElement *node in nodes) {
//Instruments say that here there are a lots of memory leaks
WaiYahCategory *wycategory = [[WaiYahCategory alloc] init];
wycategory.text = [[node childAtIndex:0] stringValue];
wycategory.idCategory = [[node attributeForName:@"id"] stringValue];
wycategory.desc = [[node attributeForName:@"desc"] stringValue];
wycategory.icon = [[node attributeForName:@"icon"] stringValue];
[self.wycategories addObject:wycategory];
[wycategory release];
}