问题描述
- 给数组添加对象时报EXC_BAD_ACCESS
-
给数组添加对象时报EXC_BAD_ACCESSint indiceCorrente=0; int differenza=delegate.reader.feedItems.count;
while(variable!=0){
switch(variable){case 1: ----
case 2: ----default: {
NSMutableIndexSet *add=[[[NSMutableIndexSet alloc]init] autorelease]; [add addIndex:indiceCorrente]; [add addIndex:indiceCorrente+1]; [add addIndex:indiceCorrente+2]; [self aggiungiElementoArrayLettura:add]; //[page addObject:@"makeLayout3"]; NSMutableArray *pagina=[[NSMutableArray alloc]init]; indiceCorrente=indiceCorrente+1; [pagina addObject:indiceCorrente]; <------ EXC_BAD_ACCESS WHY???? indiceCorrente=indiceCorrente+1; [pagina addObject:indiceCorrente]; indiceCorrente=indiceCorrente+1; [pagina addObject:indiceCorrente]; [pages addObject:pagina]; }
}
}
时间: 2024-12-29 16:08:26