MKMapView Memory Leak in iPhone Application

后端 未结 3 1463
迷失自我
迷失自我 2021-01-14 09:14

I am working on an iPhone application which uses MKMapView and shows userlocation. I am getting memory leaks where leaked object is NSCFArray

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-14 09:41

    I have the exact same issue. It looks like a bug in MKMapView to me. Three workarounds come to mind:

    1. Create your own annotation for the current position.
    2. Don't destroy and recreate the view so you only get the leak once.
    3. Turn it off.

    Fortunately for me I can turn it off without any significant loss of feature.

提交回复
热议问题