UIImagePickerController Memory Leak

前端 未结 5 1200
日久生厌
日久生厌 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条回答
  •  Happy的楠姐
    2020-12-03 09:35

    I used UIImagePickerController and after 40 capture images my application received a DidMemoryWarning message and stop, hidden all my views.

    In my application I create 40 objects of

    UIImagePickerController( new UIImagePickerController() )
    

    To work correctly I create a unique instance shared to all application and with this all work correctly.

    I supusose that control lost memory too, but only one time. My application can capture images from camera correctly:

    private static UIImagePickerController picker = new UIImagePickerController();
    

提交回复
热议问题