@autoreleasepool in loop or loop in @autoreleasepool?

前端 未结 6 583
遇见更好的自我
遇见更好的自我 2020-12-30 23:22

It\'s a good practice to put lots of autoreleased object in an autoreleasepool at loop action. I found someone put the @autoreleasepool in loop but others p

6条回答
  •  旧巷少年郎
    2020-12-31 00:05

    Depend on how many pending items will be released. Image that Autorelease Pool like your trash, put unused thing and will throw later.

提交回复
热议问题