简体   繁体   English

Xcode Instruments 10.12.1显示默认项目中的内存泄漏

[英]Xcode Instruments 10.12.1 showing memory leaks on an default project

Replicate: 复制:

  • Create a default 12.2 target Swift 5 project - with nothing changed. 创建一个默认的12.2目标Swift 5项目 - 没有任何改变。
  • Profile with Leaks in Instruments. 仪器泄漏的配置文件。
  • Tap screen a few times. 点击屏幕几次。
  • 66 memory leaks (although the number is not consistent) after short period of time. 在短时间内,66内存泄漏(尽管数量不一致)。

This occurs in various Simulators and when testing on various Phones. 这发生在各种模拟器中以及在各种电话上进行测试时。 Not expecting so many memory leaks on a default app with no modification. 不要期望在没有修改的默认应用程序上有这么多内存泄漏。

Using: - MacOS 10.14.5 (18F132) - Xcode 10.2.1 (10E1001) - Instruments 10.2.1 (10E1001) 使用: - MacOS 10.14.5(18F132) - Xcode 10.2.1(10E1001) - 仪器10.2.1(10E1001)

I have filed a report to Apple, as this makes Instruments kind of meaningless. 我已经向Apple提交了一份报告,因为这使得Instruments毫无意义。

Paul Hudson discussed this in a Hacking with Swift video ( https://youtu.be/cR4Wc4JGOMg?t=31 ). Paul Hudson在Hacking with Swift视频( https://youtu.be/cR4Wc4JGOMg?t=31 )中对此进行了讨论。 The discussion is about a minute long. 讨论大约一分钟。

The gist of it is that simulators shouldn't be used for profiling. 它的要点是模拟器不应该用于分析。 Use a real hardware device for profiling. 使用真实的硬件设备进行性能分析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM