title: Why use Autorelease pool?
body: <p>I know there is an autorelease pool created in the main method and all the objects that receive autorelease message get stored in this pool and get released when the pool drains out.</p>
  
  <p>But it is always said to avoid autoreleasing objects to avoid memory leaks and in turn app crashes.</p>
  
  <p>Then why and in which conditions should we use autoreleasepool?</p>
  
  <p>Apple docs suggest that we need to use them when we are using threads so in the beginning of a thread we need to create an autorelease pool and in the end of the thread drain it but what if we are not creating an autorelease object in the complete thread then in that condition also is it necessary to create an autoreleasepool in the beginning of the thread.</p>
  
  <p>Please clear out my confusion.
  Thanx.</p>