Skip to content

Instantly share code, notes, and snippets.

@sbrocket
Created November 10, 2008 17:23
Show Gist options
  • Save sbrocket/23550 to your computer and use it in GitHub Desktop.
Save sbrocket/23550 to your computer and use it in GitHub Desktop.
NSAutoreleasePool *pool = nil;
for (int x = 0; x < 100000; ++x) {
if (x%1000) {
[pool release];
pool = [[NSAutoreleasePool alloc] init];
}
// Do memory intensive stuff that adds a lot of stuff to the autorelease pool
}
[pool release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment