2012-05-01 7 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

関連する問題