Wrap loops content in autoreleasepool so that we can check for leaks