开发者

UIViewController and dealloc

开发者 https://www.devze.com 2023-04-12 04:22 出处:网络
When new class of UIViewController is added in Xcode, template does not include a dealloc method. Now it is not a big deal 开发者_运维知识库to add one, obviously, but i wonder if there is a reason i

When new class of UIViewController is added in Xcode, template does not include a dealloc method.

Now it is not a big deal 开发者_运维知识库to add one, obviously, but i wonder if there is a reason it is not included in a template?


I think Apple wants you to use:

  1. NIBs for UI components
  2. Autorelease blocks
  3. Automatic reference counting

All of the above techniques are taking care of the memory management process automatically. But it's just a suggested route. In Xcode 3.2 we had -dealloc in UIViewController template. And I use it often.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号