Skip to content

Instantly share code, notes, and snippets.

@jcf
Created October 17, 2008 11:09
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 jcf/17393 to your computer and use it in GitHub Desktop.
Save jcf/17393 to your computer and use it in GitHub Desktop.
Helping Geoff with a Cocoa complaint
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int number = 3;
NSString * reason = [[NSString alloc] autorelease];
switch (number)
{
case 2:
NSLog(@"Number => 2");
default:
reason = [NSString stringWithFormat:@"%@", @"foobar"];
}
[pool drain];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment