ios - ViewController 未从内存中释放
问题描述
我有这个视图层次结构
RouterDashboardViewController : RootViewController
根视图控制器:UIViewController
目前,RouterDashboardViewController 实例位于导航堆栈中。当我重置 NavigationController 的 rootViewController 时,RouerDashboardInstance 仍然存在于内存中,因为我可以检查我的deinit{}
方法没有被调用。下面是 Instruments 中的堆栈跟踪,但无法检测到我的 RouterDashboard 实例没有被释放的任何原因。我确信会有保留周期使 RouterDashboard 实例仍然存在。另一件事是不理解这些堆栈跟踪,因为 ViewDidLoad() 方法调用了多次。
解决方案
推荐阅读
- infiniband - OFED、MLNX OFED 和收件箱驱动有什么区别
- javascript - 离子/角度发送短信到数组中的多个号码
- c# - 使用 c#.net 将两个记录添加到 sqlserver 数据库中
- scala - scala - Instant 的 14 位时间戳字符串
- jquery - 如何在jquery中修复图像源
- cypher - 匹配单身关系
- powershell - powershell scriptblock 扩展调试
- android - 如何从容器中取出图像的一部分
- python - 当我有向量作为输入和向量作为输出时使用什么样的监督模型?
- mongodb - 使用正则表达式列出 MongoDB 数据库名称