@interface ViewController
{
NSMutableArray * GetPrices;
}
-(void)viewWillAppear:(BOOL)animated
{
GetPrices=[[NSMutableArray alloc]init];
// here I’m adding objects to the array..
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{@try { if(Getprices count>0) {
// dealing with array values
}
}
@catch (NSException *exception) {
// here Im using some mail service to get crash description
}
}所以我在邮箱里收到了以下信息
堆栈跟踪:-__NSCFString计数:无法识别的选择器已发送到实例0x157153180
stackoverflow.com/questions/5152651/…根据这个被接受的答案,我认为数组是在某个时候发布的。
现在我的疑问是,我的阵列是否有可能成为发布的…(假设我的应用程序在后台运行了很长一段时间,我的数组会被发布吗)。
造成这种崩溃的可能原因是什么?谢谢。。
发布于 2016-03-04 15:28:56
ARC将保留这个数组,所以在你编程之前,它是不可能被释放的。
https://stackoverflow.com/questions/35790256
复制相似问题