【发布时间】:2010-11-30 03:23:16
【问题描述】:
为什么会泄漏?
arrayOfPerformances 是一个合成的NSMutableArray、(nonatomic, retain) 属性。
currentPerformanceObject 是合成的 Performance *、(nonatomic, retain) 属性。
Performance 是一个自定义类
if(self.arrayOfPerformances == nil)
{
self.arrayOfPerformances = [[NSMutableArray alloc]init];
}
[self.arrayOfPerformances addObject:currentPerformanceObject];
[currentPerformanceObject release];
currentPerformanceObject = nil;
【问题讨论】:
标签: iphone objective-c memory-leaks