Why ARC is not deallocating memory after popViewController

前端 未结 9 773
刺人心
刺人心 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:27

    When you dismiss a view controller (or pop it), it will be deallocated if you didn't make any strong pointers to it (that controller is retained by the navigation controller, or the presenting view controller, so you usually don't need to have a pointer to it when you create it and push or present it).

    It will be be released if there are no other strong pointers to it

提交回复
热议问题