【发布时间】:2015-10-02 16:39:01
【问题描述】:
我注意到,当打开一个视图的多个实例时,我的记忆会随着用户打开的视图越多而不断攀升。如果用户开始回击,则每个视图控制器关闭时内存使用量都会下降。但是,根据用户在做什么,他可以打开 20 多个视图控制器,我该如何管理内存利用率?请记住,我需要在后台加载所有这些视图,以便在用户回击时快速加载它们
以下是我创建每个实例的方式:
let storyboard = UIStoryboard(name: "Storyboard", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("FriendPage") as! FriendVC
self.navigationController!.pushViewController(vc, animated:false)
如何管理内存利用率?
【问题讨论】:
标签: ios objective-c swift