我的iPhone应用程序正在使用多少内存(来自Simulator) [英] How much memory is my iphone app using (from Simulator)

查看:81
本文介绍了我的iPhone应用程序正在使用多少内存(来自Simulator)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这与Instruments有一定关系,但是这有点令人困惑,在Google上搜索Instruments并没有太大帮助.

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.

我想知道我的应用程序运行得如何,喜欢它使用了多少内存.我只是不知道在哪里可以找到类似的东西: 据我们从模拟器得知,您的应用程序目前将在真实的iphone设备上使用xx MB的RAM."

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.

推荐答案

出于多种原因,您不应该在模拟器中测试内存使用情况,其中一些原因是:

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

  • 模拟器是在计算机而不是电话上运行的,因此最大内存量与Mac中安装的ram数量相同.
  • 模拟器以及使用模拟器SDK构建的应用程序使用的库与设备上使用的库不同,因此可能使用不同的内存量.

但是,如果可以在设备上运行,则应该使用Instruments中的内存监视器"和对象分配"工具来监视内存使用情况.

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.

这篇关于我的iPhone应用程序正在使用多少内存(来自Simulator)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆