如何在真正的iphone / ipad设备(不是模拟器)上测试内存不足的情况? [英] How to test memory low condition on real iphone/ipad device (not simulator)?

查看:332
本文介绍了如何在真正的iphone / ipad设备(不是模拟器)上测试内存不足的情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道模拟器上有模拟内存警告。但是,很多人都说该应用应该在真实设备上进行测试。如何在真实设备上测试内存不足情况?在后台运行尽可能多的应用程序?还有更好的方法吗?

I know that there is a "Simulate Memory Warning" on the simulator. However, many people said that the app should be test on real device. How can I test the memory low condition on real device? Running as many apps as possible in background? Any better way?

谢谢。

推荐答案

你可以使用私人发送低内存消息的API:

You can use private API to send low memory message:

[[UIApplication sharedApplication] _performMemoryWarning];

虽然记得从发布中移除否则您的应用可能会被拒绝;)

Though remember to remove from release otherwise your app might get rejected ;)

Kudos转到: http:// forum .148apps.com / showpost.php?p = 8603& postcount = 3

这篇关于如何在真正的iphone / ipad设备(不是模拟器)上测试内存不足的情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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