由于 CreateImageRefFromTileData 导致泄漏

发布于 2024-12-02 12:36:26 字数 365 浏览 2 评论 0原文

有人知道 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.

General Overview

Detailed View

Responsible Caller

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘初心 2024-12-09 12:36:26

当您运行泄漏检测器时,它会向您显示分配泄漏对象的位置 - 您现在应该确保在不再需要图像时正确地解除分配(释放)图像。

编辑:如果泄漏发生在第 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文