- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我想测试我的应用程序在低内存条件下的功能,但很难测试。当应用程序在设备而不是模拟器上运行时,如何在我的 View 中引发触发 didReceiveMemoryWarning 方法的低内存警告?或者我可以通过哪些方式在这些可能的条件下测试我的应用程序?
我无法使用模拟器的原因是我的应用程序使用 Game Center 并且邀请在模拟器上不起作用。
最佳答案
您可以调用私有(private)方法:
[[UIApplication sharedApplication] performSelector:@selector(_performMemoryWarning)];
请记住仅在调试时使用它,否则您的应用将被拒绝。
关于iphone - iOS 开发 : How can I induce low memory warnings on device?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4717138/
“Java 并发实践”给出了以下不安全类的示例,由于 java 内存模型的性质,它可能会永远运行或打印 0。 这个类试图证明的问题是这里的变量不是在线程之间“共享”的。因此,线程看到的值可能与另一个线
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 4 年前。 Improve this ques
我正在使用 PerfMonitor.exe ( http://bcl.codeplex.com/wikipage?title=PerfMonitor ) 来追踪 .NET 4.0 应用程序的一些 .N
我有一个网站,我在其中转换滚动标题。我现在正致力于实现整个站点的 CSS 快速滚动。因此,当用户向下滚动时,javascript 中的滚动事件显然不会被触发。我该如何解决这个问题? 我对此很陌生,所以
我正在做一个时间序列问题。当我在做 AR 模型时,一切正常。 # Import the module for estimating an ARMA model from statsmodels.tsa
我想测试我的应用程序在低内存条件下的功能,但很难测试。当应用程序在设备而不是模拟器上运行时,如何在我的 View 中引发触发 didReceiveMemoryWarning 方法的低内存警告?或者我可
我是一名优秀的程序员,十分优秀!