Are viewDidUnload and dealloc always called when tearing down a UIViewController?

后端 未结 2 1844
深忆病人
深忆病人 2020-12-05 14:18

I\'d like to know whether or not both viewDidUnload and dealloc are always called in succession in the UIViewController tear-down process.

2条回答
  •  暖寄归人
    2020-12-05 14:53

    It is quite thoughtful that, viewDidiUnload method get only called when memory warning appears. Good practise would be to release requisite the object within this method and also make the object nil.

提交回复
热议问题