由于 CreateImageRefFromTileData 导致泄漏
有人知道 CreateImageRefFromTileData 是关于什么的吗?它似乎与 MapKit 相关,因为它发生在 UIViewController 中,我在其中显示带有一些位置图钉的地图。而已。
但我无法进一步猜测它位于更深处的位置。
有人可以帮助我吗?
更新:
以下是一些显示泄漏描述的图片。
does somebody know what CreateImageRefFromTileData is about? It seems to be related to MapKit because it's occuring in a UIViewController where I display a map with some location-pins. Nothing more.
But I've no further guess where it's more deeply located.
Can somebody help me?
Update:
Here are some pictures showing the leak description.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您运行泄漏检测器时,它会向您显示分配泄漏对象的位置 - 您现在应该确保在不再需要图像时正确地解除分配(释放)图像。
编辑:如果泄漏发生在第 3 方库内,则有两种情况:
泄漏的对象是库中的内部对象,您无法访问该对象。在这种情况下,如果您没有库的源代码,则您无能为力(我想向开发人员抱怨)
如果泄漏的对象是库返回给您的东西,请确保释放该对象适当地。弄清楚发生了什么情况的一个有用技术是在应用程序中执行每个操作后观察泄漏分析器,同时玩应用程序 - 这可能有助于定位泄漏在应用程序的哪个分支中。
When you run the leak detector, it shows you the place where the leaked object was allocated - you now should look make sure you deallocate (release) the image properly when you no longer need it.
Edit: if the leak is within a 3rd party library, there are two scenarios:
the leaked object is an internal object in the library, which you can't access. In this case if you don't have the source for the library, not much you can do (complain to the developer I suppose)
if the leaked object is something that the library returned to you, make sure you release that object properly. A useful technique for figuring out what happens is playing with the app while watching the leak analyzer after every operation you do in the app - this may help locating in which branch of your app the leak is.