title: How to create/end run loop to properly deallocate memory?
body: <p>In my ARC iOS app I am running a for loop that ends up with a large memory allocation overhead. I want to somehow end my for loop with minimal/no extra memory allocated. In this instance I am using the SSKeychain library which lets me fetch things from a keychain. I usually just use autorelease pools and get my memory removed properly but here I don't know what is wrong because I end up with 70 mb + of memory allocated at the end of the loop. I have been told that I should start/end a run loop to properly deal with this. Thoughts?</p>
  
  <pre><code>for (int i = 0; i &lt; 10000; ++i) {
              @autoreleasepool {
                  NSError *  error2 = nil;
                  SSKeychainQuery*  query2 = [[SSKeychainQuery alloc] init];
                  query2.service = @"Eko";
                  query2.account = @"loginPINForAccountID-2";
                  query2.password = nil;
                  [query2 fetch:&amp;error2];
              } 
  }
  </code></pre>