iphone - 为什么第二次崩溃?

标签 iphone objective-c uitableview crash

大家好,
我是Objective-C的新手,正在开发一个应用程序,当您单击表格单元格时,它可以完成预期的工作,但是当您第二次返回并单击该单元格时,它崩溃并显示为“EXC_BAD_ACCESS”。您能否告诉我这是什么意思,为什么它仅在第二次崩溃,我该如何解决?我很确定它在此功能中:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic may go here. Create and push another view controller.

    RaceData * data = [self.units objectAtIndex:indexPath.row];
    ProtossInfo * info = [[ProtossInfo alloc] initWithNibName:@"ProtossInfo" bundle:nil];

     // ...
     // Pass the selected object to the new view controller.
    [self.navigationController pushViewController:info animated:YES];

    info.title = data.titler;
    info.minerals.text = data.min;
    info.vespene.text = data.vesp;
    info.supply.text = data.sup;
    info.portrait.image = data.porty;

    [info release];
    [data release];

}  

最佳答案

您要发布的不是dataretain

关于iphone - 为什么第二次崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4332034/

相关文章:

javascript - 将 javascript 函数转换为 Obj-C 函数

ios - 具有两个自动布局标签的 TableView 单元格,在 UIViewController 中不显示所有行

ios - 当城市名称等于某个国家的名称时,CLGeocoder 返回错误的结果(不仅如此)

ios - 如何从IOS应用程序访问iPhone/ipad native 相机应用程序?

iPhone + UIView。绘制矩形期间消耗大量内存。有什么策略可以减少这种情况吗?

iphone - iPhone资源的Dashcode开发

iphone - 获取 UITextField 中填写的 5 个最近项目的列表

iphone - UITableView 删除行并显示 'no content' 行

ios - NSObject 数据到 UITableViewCell

iphone - UIDatePicker,根据日期名称和今天的日期设置最大和最小日期