Email 退出Mail Composer后应用程序崩溃
我的应用程序在关闭MFMailComposeViewController后不久崩溃。UIWebDocumentView正在发布,它解除分配ComposeBodyField对象,并在objc_msgSend上崩溃。它只在某些时候发生,而且只在旧设备上发生。我假设某个东西在应该释放/清理之前就被释放/清理了,所以当消息被发送时,该对象不存在Email 退出Mail Composer后应用程序崩溃,email,uiwebview,crash,mfmailcomposeviewcontroller,Email,Uiwebview,Crash,Mfmailcomposeviewcontroller,我的应用程序在关闭MFMailComposeViewController后不久崩溃。UIWebDocumentView正在发布,它解除分配ComposeBodyField对象,并在objc_msgSend上崩溃。它只在某些时候发生,而且只在旧设备上发生。我假设某个东西在应该释放/清理之前就被释放/清理了,所以当消息被发送时,该对象不存在 问题是我无法获得更多的信息,我不知道这些信息是如何联系在一起的。如果有人能对此有所了解,那就太好了。我在关闭MFMailComposer后也遇到过类似的崩溃问题
问题是我无法获得更多的信息,我不知道这些信息是如何联系在一起的。如果有人能对此有所了解,那就太好了。我在关闭MFMailComposer后也遇到过类似的崩溃问题。删除[myMailComposer发行版]后,一切正常。我确信我遵守了内存管理的规则,因为在应用程序中,除了这个特定的地方,其他地方都可以。现在我的Build&Analyze对它唠叨不休,但是这个应用程序非常稳定 请尝试这个适合我的代码
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
switch (result)
{
case MFMailComposeResultCancelled:
{
break;
}
case MFMailComposeResultSaved:
{
break;
}
case MFMailComposeResultSent:
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Email" message:@"Email Sent" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
[self performSegueWithIdentifier:@"backHome" sender: self];
break;
}
case MFMailComposeResultFailed:
{
NSLog(@" Failed");
break;
}
default:
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Email" message:@"Email Failed" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
}
break;
}
}