iPhone: - [CFString Release]:发送给exprocated实例的消息
题
一个我正在努力的应用程序在iPhone上运行但不在模拟器上运行时保持崩溃(尽管在没有符号Malloc_Error_Break的情况下运行时显示警告,但应用程序一直在SIM上工作)
我不是手动发布任何字符串,而是我使用:
[[[NSString / NSMutableString alloc] init] autorelease];
.
(我为其他应用程序做的一直都是,从未给我问题)
现在,当我将malloc_error_break设置为一个断点时,我得到:
2012-03-07 17:04:06.072 columns[15487:f803] *** -[CFString release]: message sent to deallocated instance 0x68c8210
.
与Xcode4跳转到:
int main(int argc, char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); >>> Thread 1
[pool release];
return retVal;
}
.
当在模拟器BTW上运行时,我也有nszombieNenabled>
如果有人可以帮助我如何在Xcode 4上调试这一点,或者将我指向在线的教程,这将非常感谢!
关于
David
解决方案
从NSString方法中删除自动内释放,然后重新加入,直到它崩溃(我猜这是答案,所以......)
不隶属于 StackOverflow