排除因内存导致的 iPhone/iPad 设备崩溃问题

标签 iphone ipad memory-leaks memory-management

我有一个应用程序经常在设备(iPad)上崩溃,但在模拟器上却不会,因此任何模拟器调试策略(例如 MallocStackLogging)都不是一个选项。我通常在控制台中得到的是这样的:

Received memory warning. Level=1
Received memory warning. Level=2
Program received signal:  “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

我的问题是,此时我可以做些什么来找出导致崩溃的确切原因吗?显然这是一个内存问题,但我很难找到原因。是不是漏水了?分配太多?除了“使用性能工具运行 > 泄漏”之外,我还能做些什么来追踪问题吗?

最佳答案

另一个好工具是静态分析器。只需单击构建菜单中的构建和分析,它就会向您显示介于许多和大多数内存泄漏之间的情况。

查看 Apple Developer Document有关如何读取结果的更多说明。

关于排除因内存导致的 iPhone/iPad 设备崩溃问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4045870/

相关文章:

ios - 重新设计的 iTunes Connect 中的崩溃报告

ios - 从两个类访问同一段代码

memory-leaks - Flutter:Cloud_Firestore 给出错误 "FlutterView.send called on a detached view, channel=plugins.flutter.io/cloud_firestore"

C++析构函数内存泄漏

delphi - 如何使用 LeakCheck 处理 DUnit 中的 "false"/expected 内存?

ios - 我如何在 zendrive iOS 中测试事故检测

css - -webkit-text-size-调整在 iPad OS 13 上不起作用

iphone - 如何制作美国版和英国版的iPhone应用程序?

iphone - 添加全景 View - 添加到 iPhone 应用程序中的 html 文件中

iphone - 比较 2 个相同的字符串