Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 UIPageViewController 加载多个视图控制器。当我在 Instruments 工具中运行我的应用程序时。我发现分配正在向高利润转移。虽然我正在释放并使类对象为零。当我来回移动时,分配继续增加。我错过了什么?
请找到截图
关闭僵尸。默认情况下,僵尸永远不会被删除,因此在 Instruments 中,您所看到的只是增加了内存使用量。请注意,这些条都是纯蓝色的,没有任何内容被删除。
您正在查看“总体分配”图。这个数字告诉你自进程开始以来已经创建了多少对象——数量永远不会减少。
如果您想知道在给定时间有多少对象,您必须查看“# Living”列。