iOS memory usage increasing, can't find the culprit

佐手、 提交于 2019-11-28 12:03:57

According to the memory monitor in Xcode, this is causing unbounded memory growth (and eventually memory warnings and force quits) - but profiling the memory usage using the allocations instrument shows the memory usage to be stable.

Believe Instruments and the Allocations information - not the memory monitor in Xcode. The memory monitor graph is completely irrelevant. Ignore it.

This is not because the memory monitor in Xcode is useless or wrong. It is because memory management is completely different for a debug build than for a release build (Instruments uses a release build). This is especially true in Swift (you don't say whether you're using Swift).

Observe memory usage only on the device and only in a release build. Otherwise, you'll be completely misled.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!