When is UIViewController viewDidUnload called?

前端 未结 5 1534
走了就别回头了
走了就别回头了 2020-11-30 21:26

Note: This question is outdated—viewDidUnload is deprecated iOS 6.

When does UIViewController\'s viewDidUnload automatically get called? Yes I

5条回答
  •  暖寄归人
    2020-11-30 21:58

    viewDidUnload called in low memory conditions. We should unload stuff that we loaded in viewDidLoad method. We need to relinquish ownership of object by calling accessor method to set it to nil. In case of an outlet, the object release itself so the object reference can be set safely to nil. If not a synthesized property, then we first need to release object than we set to nil.

提交回复
热议问题