Skip to content

Instantly share code, notes, and snippets.

@boboboa32
Created October 11, 2012 14:27
Show Gist options
  • Save boboboa32/3872749 to your computer and use it in GitHub Desktop.
Save boboboa32/3872749 to your computer and use it in GitHub Desktop.
void main()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *args = [[NSProcessInfo processInfo] arguments];
for (NSString *fileName in args) {
NSAutoreleasePool *loopPool = [[NSAutoreleasePool alloc] init];
NSError *error = nil;
NSString *fileContents = [[[NSString alloc] initWithContentsOfFile:fileName
encoding:NSUTF8StringEncoding error:&error] autorelease];
[loopPool drain];
}
[pool drain];
exit (EXIT_SUCCESS);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment