Created
January 17, 2014 01:31
-
-
Save rnapier/8466934 to your computer and use it in GitHub Desktop.
Testing memory growth, optimized with standard Xcode settings (paste into Command Line app and hit Cmd-I)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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