2012-05-01 4 views
3

MFMailComposeViewController을 사용하여 내 앱에서 이메일을 전송합니다.
내 앱을 실행할 때 기기,
전자 메일을 보내려면 누를 때가 있습니다. iPhone - MessageUI 프레임 워크에 누수가 있습니까?

Leaked Object # Address Size Responsible Library Responsible Frame 

MutableMessageHeaders,1 0x6be950 32 Bytes MessageUI +[MFComposeTypeFactory headersFromDelegate:] 

_MFOutgoingMessageBody,1 0x1190ed0 32 Bytes Message -[MessageWriter createMessageWithPlainTextDocumentsAndAttachments:headers:] 


이이 MessageUI 프레임 워크의 누출, 당신은 그것을 해결하는 방법을 알고 계십니까?

- (void)showMailComposer 
{ 
     MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; 
     picker.mailComposeDelegate = self; 
     [picker setSubject:@"Subject"]; 
     NSString *emailBody = @"Email body"; 
     [picker setMessageBody:emailBody isHTML:NO]; 
     [self presentModalViewController:picker animated:YES]; 
     [picker release]; 
} 

#pragma mark - 
#pragma mark Dismiss Mail/SMS view controller 

    // Dismisses the email composition interface when users tap Cancel or Send. Proceeds to update the 
    // message field with the result of the operation. 
    - (void)mailComposeController:(MFMailComposeViewController*)controller 
       didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error 
{ 
      [self dismissModalViewControllerAnimated:YES]; 
    } 
+0

코드를 게시하십시오. – Dancreek

답변

1

그래, 그렇게 보입니다. 그러나 보낸 전자 메일 당 총 64 바이트가 걱정되어야합니다.

+0

비웃음이 싫어. 그러나 그것은 대중적인 의견 인 것 같습니다 ... 그리고 OS 업데이트마다 메모리 누수 비율이 증가하는 것을 봅니다. 이 모든 것이 실제로 의미하는 것은 사용자가 전화기를 더 자주 다시 시작해야한다는 것입니다. 동시에 애플은 사용자 경험을 훨씬 향상시킬 수 있도록 최선을 다할 것을 우리에게 지시합니다 ... 흠. – stephen