iphone - "EXC_BAD_ACCESS"我该如何解决这个问题?

标签 iphone objective-c ios ios4

我想在点击按钮时做以下事情:

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
     if (buttonIndex == 0)
     {
         if (QuestionMutableArray==nil) {
            [self testIterator];
         } 
         else
         {
             [myMutableArray release];
             [myDictionary release]; 
             [self dismissModalViewControllerAnimated:YES];

             //[self release];
         }
     }
}

使用此代码返回 parentView Controller 后...当我再次使用此 tableView 时,我想用新的 NSMutableArray 重新加载我的 tableView。我如何使用 dismissModalViewController 清空我的集合(NSMutableArray 或字典)?

最佳答案

使用removeAllObjects 方法。

关于iphone - "EXC_BAD_ACCESS"我该如何解决这个问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5804757/

相关文章:

iphone - 没有替换图像和单元格的 UITableView 重绘

iphone - 准确无缝地将文本拆分为两个 UILabel

iphone - IOS注销时如何释放app保留的对象或内存

iphone - 将注释和 Pdf 保存到 IOS 5 中的新 Pdf 文件

iphone - 使用 NSFetchedResult Controller 处理节标题

用于条形码阅读器的 iOS 库

ios - 在 iOS 应用程序中从 MySQL 加载数据

iphone - 单位换算库 - Objective C

ios - Apple Watch 的录音功能

iphone - 在 friend 的 iPhone 上测试 Phonegap Build 应用程序