Xcode 6 内存泄漏工具不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25968301/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:39:06  来源:igfitidea点击:

Xcode 6 Memory Leaks Instrument doesn't work

xcodememory-leaksxcode6instrumentsxcode-instruments

提问by spanfish

I am trying to use Instruments to find leaks within my app. I do it in the same way as I did before updating to Xcode 6.x. Since updating, it won't take any snapshots: the leaksinstrument status displays "Analyzing process" and will never change.

我正在尝试使用 Instruments 来查找我的应用程序中的漏洞。我的做法与更新到 Xcode 6.x 之前的做法相同。自更新以来,它不会拍摄任何快照:泄漏仪器状态显示“正在分析过程”并且永远不会改变。

Both Xcode 6.0.1 and 6.1 GM 2 exhibit this problem.

Xcode 6.0.1 和 6.1 GM 2 都出现了这个问题。

Any workaround?

任何解决方法?

回答by LarryPel

Seems like is a bug on iOS8 and not on Xcode. I have Xcode6.1 and the memory leak profiler seems to work on iOS7.

似乎是 iOS8 上的错误,而不是 Xcode 上的错误。我有 Xcode6.1 并且内存泄漏分析器似乎可以在 iOS7 上运行。

As a workaround until Apple fix this (already reported the bug and was marked as duplicate) you can profile your memory leaks using a simulator.

作为在 Apple 修复此问题(已报告错误并被标记为重复)之前的解决方法,您可以使用模拟器分析内存泄漏。

回答by Rapha?l Agneau de Selve

This issue seems to occur only on my iOS 8.x devices.

这个问题似乎只发生在我的 iOS 8.x 设备上。

I also submitted a bug report but in the meantime I have it working with the following configuration :

我还提交了一个错误报告,但同时我让它使用以下配置:

  • Xcode 6.1
  • iPhone 4 with iOS 6.1.3
  • Xcode 6.1
  • 装有 iOS 6.1.3 的 iPhone 4

This is still a workaround though as you can hardly debug any iOS 8 related feature and analyzing leaks on an old device like that is a real pain.

这仍然是一种解决方法,因为您几乎无法调试任何与 iOS 8 相关的功能,并且在像这样的旧设备上分析泄漏是一种真正的痛苦。