为什么泄漏仪器告诉我这是泄漏?我正在使用 ARC。我应该怎么做才能不泄漏?顺便说一句,我尝试将“强”更改为“弱”,但随后收到警告"Assigning retained object to weak property; object will be released after assignment"
@property (nonatomic, strong) NSMutableArray *myArray;
-(id)init{
self = [super init];
if (self){
_myArray = [[NSMutableArray alloc] init]; //<== leak here
}
return self;
}