当我试图从线程更新UIActivityIndicatorView。该应用程序因抛出异常而崩溃 正在完成的修改层 - 0x7e177fd0 - [CALayer removeAnimationForKey:]:发送到释放实例0x7e177fd0的消息。 当我尝试跟踪mallocDebugger工具的内存泄漏。内存崩溃时,我尝试停止动画UIActivityIndicatorView
这种崩溃是不是在所有的时间发生的事情发生了十分之一的
请帮我出这个ROM的内存问题
NSAutoreleasePool *池= [[NSAutoreleasePool的alloc]初始化]
[autoRechargeCell addSubview:activityIndicator];
[self.activityIndicator startAnimating];
if([PennyTalkAPI getBalanceInfoForAccount:appDelegate.accountNumber withPIN:appDelegate.pinNumber])
{
[autoRechargeCell.switchField setOn:[[NSUserDefaults standardUserDefaults] boolForKey:@"AutoRecharge"]];
[self.activityIndicator stopAnimating]; <<<<<<<<<<<<<<<<<<<<<<
}
else
{
[self.activityIndicator stopAnimating];
}
[pool release];
这是代码我已经写
发布您的代码。 – 2012-04-13 13:05:02
请张贴您的部分代码。 – mChopsey 2012-04-13 13:09:30
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; [autoRechargeCell addSubview:activityIndicator]; [self.activityIndicator startAnimating]; if([PennyTalkAPI getBalanceInfoForAccount:appDelegate.accountNumber withPIN:appDelegate.pinNumber]) {autoRechargeCell.switchField setOn:[[NSUserDefaults standardUserDefaults] boolForKey:@“AutoRecharge”]]; [self.activityIndicator stopAnimating]; } else { [self.activityIndicator stopAnimating]; } [pool release]; – Naren 2012-04-13 13:32:43