【发布时间】:2010-10-10 19:31:14
【问题描述】:
我有一个 ipad 应用程序,其中包含类别(其中包含 tableviewcontrollers)和具有 webview 的详细视图,显示 tableview 上的行信息。
关于类别表视图的 didSelectRowAtIndexPath 函数,我使用的代码如下:
DetayViewController *dvc = [[DetayViewController alloc] init];
Blog *b = (Blog *)[self.blogArray objectAtIndex:indexPath.row];
dvc.cagirilanBlog = b;
[self presentModalViewController:dvc animated:YES];
这很好用。但是在使用应用程序时,如果您在表格视图中单击行并打开一个详细信息页面并关闭它大约 30 次,应用程序就会崩溃并退出。
应用崩溃时我收到的警告如下:
**Received memory warning. Level=1**
**Received memory warning. Level=2**
**Program received signal: “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")**
当我关闭模态视图控制器时,我将释放我在详细视图中使用的所有对象。但我无法解决的问题是它为什么会崩溃?那是一个错误吗?我不能使用 presentModalViewController 超过 30 次吗?
请帮帮我。
谢谢。
【问题讨论】:
标签: iphone objective-c ipad memory-management modalviewcontroller