Cancelling MFMailComposeViewController causes a memory leak?

拥有回忆 提交于 2019-12-10 03:54:10

问题


I use MFMailComposeViewController in an app I'm working on now. When user taps on a button, email form pops up.

Now when I use instruments to monitor memory during this process I see that every time you push the cancel button and the action sheet appears, about 2.5 mb of memory adds up to live bytes in all heap & anonymous vm. This only occurs if you tap the cancel button, everything runs normally when you send the email.

Btw I checked Apple's MessageComposer sample code here , it has the same issue.

Does anyone know what might be the reason?


回答1:


Sounds like a memory leak in the API (UIKit) - they are rare but they certainly do occur, I remember reporting one back in SDK 4.0 which occured when running the standard 'Masterview Controller' template.



来源:https://stackoverflow.com/questions/19708510/cancelling-mfmailcomposeviewcontroller-causes-a-memory-leak

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!