简体   繁体   English

情节提要视图控制器泄漏

[英]Storyboard view controller leaks

I'm having leaks and I can't figure out how to fix them. 我有泄漏,我不知道该如何解决。 You'll find below the Instruments screenshot. 您可以在Instruments屏幕截图下面找到。

在此处输入图片说明

And that's the piece of code triggering most of them. 这就是触发大多数代码的代码。

在此处输入图片说明

Is there any other way to instantiate a view controller that wouldn't create leaks? 还有其他实例化不会造成泄漏的视图控制器的方法吗?

You should check what are you actually leaking - generation analysis is a good start. 您应该检查您实际泄漏的内容-生成分析是一个好的开始。

My guess is that UIKit might leak some strings and dictionaries which, in my experience, somewhat expected when using nibs or storyboards. 我的猜测是,UIKit可能会泄漏一些字符串和字典,以我的经验,使用笔尖或情节提要时可能会有些许期望。

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

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