static NSString *strArr[] = {@”one”,@”two”,@”three”,@”four”};
for (int i = 0; i < 5; i ++) {
NSString *str = strArr[i];
NSLog(@”%@”,str);
}
这个在调试的时候(command+R)不会出错,只有在打包上架之后,或者用command+^+i,打开leaks跑(即内存泄露检测),会出现crash,
c中字符串数组导致的crash
最新推荐文章于 2018-05-30 16:01:43 发布