swift - Xcode 10.2 检测到新的单 View 应用程序中的内存泄漏

标签 swift xcode memory-leaks xcode10 xcode-instruments

任何人都可以在使用 Xcode 10.2.1 (10E1001)/Swift 5/iOS 12.2 创建的未更改 单 View 应用程序中重现内存泄漏吗?如何使用集成的内存泄漏工具认真工作?有任何解决方法吗?

第一张图片显示 1 次内存泄漏 (iPhone 8) enter image description here

第二张图显示37处内存泄漏(iPhone Xr模拟器) enter image description here

注意

每次启动分析器工具时,泄漏量都不同。

编辑 1

我注意到,Xcode 10 使用了新的构建系统。也许问题是基于此。 Build System Release Notes for Xcode 10

编辑 2

question好像和我的很像。

最佳答案

新的 Xcode 10.3 解决了这个问题 release !

Resolved an issue where running an app in iOS 12.2 or later under the Leaks instrument resulted in random numbers of false-positive leaks for every leak check after the first one in a given run. (48549361)

关于swift - Xcode 10.2 检测到新的单 View 应用程序中的内存泄漏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56208665/

相关文章:

ios - viewDidLoad 之后如何创建/添加 UIView?

json - 从 json 文件中的字典中解析特定内容

objective-c - 在不重新编译的情况下从静态 lib(.a) 中删除方法调用

c - 释放数据时内存泄漏?

c - C语言声明错误,有返回值

ios - iOS 应用程序的应用程序工作流程

ios - 如何将 UILabel 放入 "inputAccessoryView"用于键盘?

ios - 如何在 iOS 中为横向和纵向 View 创建单独的布局

ios - swift : How to check if UserDefaults exists and if not save a chosen standard value?

iOS 内存管理和 NSString 初始化