Skip to content

Instantly share code, notes, and snippets.

@kmdarshan
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmdarshan/b2fb19d6907cd5681b9f to your computer and use it in GitHub Desktop.
Save kmdarshan/b2fb19d6907cd5681b9f to your computer and use it in GitHub Desktop.
Autorelease pool2
// Using auto release pools
@autoreleasepool {
NSMutableArray *temporaryArrayForPairs = [NSMutableArray new];
for (int i=0; i<500000; i++) {
Pair *pair = [Pair new];
pair.grandParent = @"darshan was here";
[temporaryArrayForPairs addObject:pair];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment