Why ARC is not deallocating memory after popViewController

前端 未结 9 934
刺人心
刺人心 2021-02-01 02:20

I\'m pushing and popping ViewControllers in UINavigationController.

I\'m tracking the memory consumption of my app. While pushing the new viewController the memory consu

9条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 02:35

    Consider reviewing whether you are referencing self in a block. If you do, you risk holding onto the UIViewController reference after you have popped it.

    For a more in-depth review of why, check out this answer: How do I avoid capturing self in blocks when implementing an API?

提交回复
热议问题