UIImagePickerController Memory Leak

前端 未结 5 1210
日久生厌
日久生厌 2020-12-03 08:49

I am seeing a huge memory leak when using UIImagePickerController in my iPhone app. I am using standard code from the apple documents to implement the control:<

5条回答
  •  广开言路
    2020-12-03 09:45

    The "Mark Heap" button in Instruments has been, for me, the absolute best way of tracking down these sorts of issues.

    This is an OK article on how to use it: http://www.friday.com/bbum/2010/10/17/when-is-a-leak-not-a-leak-using-heapshot-analysis-to-find-undesirable-memory-growth/

    But it will tell you, for sure, which objects are surviving longer than you expect... and, ultimately, what the source of the issue is.

    You can also see a complete retain/release trace for each individual object which survived - allowing you to pinpoint where your problem is.

    EDIT: I use a UIImagePickerControllers as well, and I can promise it doesn't leak (at lesat for me) the way you're suggesting - so, whatever is going on, it's almost surely fixable.

提交回复
热议问题