【发布时间】:2012-01-26 03:58:26
【问题描述】:
我有一个这样声明的属性:
@property (nonatomic, retain) NSMutableArray *pricingLevels;
我这样分配它:
self.pricingLevels = [[[NSMutableArray alloc] init];
在我的 dealloc 中我有这个:
self.pricinglevels=nil;
当我用 xCode 分析我的代码时,它说我这里有内存泄漏:
self.pricingLevels = [[[NSMutableArray alloc] init];
我是否应该在此使用autolrelease,因为self.pricinglevels 也包含对数组的引用?
【问题讨论】:
-
这回答了你的问题。 stackoverflow.com/questions/6055274/…
标签: objective-c nsmutablearray