How much memory is my iphone app using (from Simulator)

[亡魂溺海] 提交于 2019-12-24 03:00:37

问题


I know this has something to do with Instruments, but well it's kind of confusing and searching for Instruments on Google doesn't help much.

I'd like to know how well my app runs, like how much memory it uses. I just don't know where to find something like: "As close as we can tell from the simulator you'll app will currently be using xx MBs of RAM on a real iphone device."

I need help on how to get this information.


回答1:


You shouldn't test your memory usage in the simulator for a number of reasons, some of which are:

  • The simulator is running on your computer, not the phone, so the maximum amount of memory is the same as the amount of ram you have installed in your Mac.
  • The simulator, and your app when build with the simulator SDK, do not use the same libraries as they would on the device, and as a result, could use a different amount of memory.

However, if you can run on a device, you should use the Memory Monitor and Object Allocations instruments in Instruments to monitor your memory usage.




回答2:


You should use the Run/With Performance Tools/Object Allocations. The graphs will show you the memory used.

And then you check the box "Created and Still Living" to know what objects are in memory.



来源:https://stackoverflow.com/questions/2755385/how-much-memory-is-my-iphone-app-using-from-simulator

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