Home > DeveloperSection > Interviews > Three occasions when you might use your own autorelease pools

Posted on    September-07-2015 12:12 AM

 iPhone iPhone  Ios  Objective C 
 1 Answer(s)
  745  View(s)
Rate this:

Mikki Halpin
Mikki Halpin

Total Post:5

Posted on    September-07-2015 12:12 AM

If you are writing a program that is not based on a UI framework, such as a command-line tool.

If you write a loop that creates many temporary objects.You may create an autorelease pool inside the loop to dispose of those  objects

 before the next iteration. Using an autorelease pool in the loop helps to reduce the maximum memory footprint of the  application.

If you spawn a secondary thread.

Modified On Apr-16-2016 02:52:44 AM

Don't want to miss updates? Please click the below button!

Follow MindStick