简体   繁体   English

如果我的视图控制器调用deinit(),是否意味着我没有内存泄漏?

[英]If my view controller calls deinit(), does that mean that I don't have memory leaks?

如果视图控制器能够调用deinit(),这是否意味着我没有强大的引用周期?

If your view controller's deinit block runs, it means your view controller isn't involved in a strong retain cycle. 如果您的视图控制器的deinit块运行,则意味着您的视图控制器不会参与强大的保留周期。 It doesn't mean your program is completely free of memory leaks. 这并不意味着您的程序完全没有内存泄漏。

If you want to be sure you don't have memory leaks, try using the Leaks instrument in Instruments. 如果要确保没有内存泄漏,请尝试使用Instruments中的Leaks仪器。

Finding Memory Leaks in Your App 查找应用程序中的内存泄漏

暂无
暂无

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

相关问题 收到NSNotification后执行选择器将调用我的视图控制器的deinit - Executing a selector after receiving NSNotification calls my view controller's deinit 如果从委托访问我的视图时得到EXC_BAD_ACCESS,这是否意味着我发生了内存泄漏? - If I get EXC_BAD_ACCESS when accessing my view from a delegate, does that mean I have a memory leak? swift playground / deinit {}中的内存泄漏并未始终如一地调用 - Memory leaks in the swift playground / deinit{} not called consistently iOS:Xcode 4.2:Leaks Instrument说我的NSMutableArray和NSMutableDictionary泄漏了,但我看不到哪里 - iOS: Xcode 4.2: Leaks Instrument says I have a leak with my NSMutableArray and NSMutableDictionary but I don't see where navigationController..popViewController(animated:true)不会取消初始化视图控制器 - navigationController?.popViewController(animated: true) doesn't deinit the view controller 查看具有强引用的控制器导致内存泄漏 - View controller with strong references causing memory leaks 如何正确管理我的记忆,以免出现问题? - How can I correctly manage my memory so I don't have problems? 我有一个有效的滑动检测器脚本,但我不知道如何将它连接到我的角色控制器 - I have a working swipe detector script, but I don't know how to connect it to my character controller 取消加载视图控制器的最佳方法? - Best way to deinit a loading view controller? 似乎每个View Controller都在创建我的struct的唯一实例-我不想这样做? - It seems like each View Controller is creating a unique instance of my struct - which I don't want?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM