NSLog可以崩溃申请吗?

HML*_*HML 1 iphone

我是iPhone SDK的新手.我在控制台中打印每个数组.无论消耗多少数据.我注意到有时我的应用程序崩溃了.它给了我BAD_ACCESS和指针显示在我的NSLog线上.我很困惑NSLog可以崩溃应用程序吗?这是我的代码:

for (int i = 0; i < [UserNeedListArray count]; i++) {
    EndUserNeed* aEndUser = [UserNeedListArray objectAtIndex:i];
    if ([appData.CurrentUser.userId isEqualToString:aEndUser.UserId]) {
        NSMutableArray* temp = [[NSMutableArray alloc]init];
        [temp addObject:aEndUser];
        NSLog(@"%@",temp);
        [arr_ShowMyOnly addObject:[temp objectAtIndex:0]];
        NSLog(@"%@",arr_ShowMyOnly);
        [temp removeAllObjects];
        [temp release];
        temp = nil;
    }
}
Run Code Online (Sandbox Code Playgroud)

请帮帮我.谢谢你......

Car*_*rlJ 5

一些NSLog()例子:

NSString *format = @"%s %d";    
NSLog(format, __FUNCTION__);
Run Code Online (Sandbox Code Playgroud)

会在设备上崩溃并且不会在模拟器上崩溃