English 中文(简体)
记忆坠毁更新倡议活动指标 观点
原标题:Memory crash updating UIActivityIndicatorView
  • 时间:2012-04-15 08:45:20
  •  标签:
  • iphone

每当我试图更新<条码>倡议指标时 透镜通过投掷一个例外情况而坠毁。

modifying layer that is being finalized - 0x7e177fd0 -[CALayer removeAnimationForKey:]: message sent to deallocated instance 0x7e177fd0

当我试图跟踪记忆泄露成为小孔径流的工具时,这一坠毁事件在10人中始终没有发生。

请让我从这个记忆问题中解脱。

即将实施:

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]; 

这是我撰写的法典。

最佳回答

你们正在从二读中更新它,这就是为什么它正在坠毁,而是把它放在像主要线上。

   [self.activityIndicator performSelectorOnMainThread:@selector(stopAnimating) withObject:nil waitUntilDone:NO];  

我认为这可能有助于你。

问题回答

See this. add [[NSNotificationCenter defaultCenter] removeObserver:self]; to UIActivityIndicatorView+AFNetworking.m dealloc https://github.com/AFNetworking/AFNetworking/issues/2748





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签