Weak and strong properties in -viewDidUnload under ARC

前端 未结 3 2033
无人及你
无人及你 2021-02-06 12:11

I am new to iphone development . I am using ARC for my project. As far as I understood using ARC we don\'t have to release any object manually. But , I have observed in some pla

3条回答
  •  终归单人心
    2021-02-06 12:51

    When you are using unsafe_unretained, you should assign it to nil because it will not be assigned to nil implicitly, where is case of weak reference it will be assigned to nil implicitly.So in order to avoid any dangling reference you need to assign to nil in case of unsafe_unretained.

提交回复
热议问题