Dealloc not being called on ARC app

前端 未结 7 1227
盖世英雄少女心
盖世英雄少女心 2020-12-12 18:21

I have a UIViewController that is pushed onto a container controller and then popped off, and using the allocations instrument, I can see that the view controller is destroy

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 18:55

    Even with ARC you can inspect the reference count manually:

    CFIndex rc = CFGetRetainCount((__bridge CFTypeRef)myObj);
    

    You can know for sure if your code is hung in a memory cycle.

提交回复
热议问题