@autoreleasepool in loop or loop in @autoreleasepool?

前端 未结 6 594
遇见更好的自我
遇见更好的自我 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-30 23:39

    Here is a different approach with Core Data an autoreleasepools:

    Testing Core Data with very big hierarchical data sets of Efficiently Importing Data important for you is the Wrap the contents of the outer loop in an NSAutoreleasePool init/release and NSManagedObjectContext save solution.

提交回复
热议问题