Skip to content

Instantly share code, notes, and snippets.

@rnapier
Created Jan 17, 2014
Embed
What would you like to do?
Testing memory growth, optimized with standard Xcode settings (paste into Command Line app and hit Cmd-I)
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
for(NSUInteger i = 0; i < 10000; i++)
{
for(NSUInteger j = 0; j < 10000; j++)
{
NSNumber* n = [NSNumber numberWithUnsignedInteger:j];
NSLog(@"%@", n); //Disabled this to increase memory bloat faster.
}
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment