Skip to content

Instantly share code, notes, and snippets.

@Superbil
Created July 3, 2013 10:32
Show Gist options
  • Save Superbil/5916926 to your computer and use it in GitHub Desktop.
Save Superbil/5916926 to your computer and use it in GitHub Desktop.
你是不會用 return 嗎?!
- (id)initWithOperationQueue:(NSOperationQueue *)operationQueue
{
id object = nil;
////////////////////////////////////////////////////////////////////////////////////////////////////
do
{
if(operationQueue==nil)
{
break;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
if((self=[super init]))
{
operationQueue_ = [operationQueue retain];
object = self;
}
}while(0);
////////////////////////////////////////////////////////////////////////////////////////////////////
if(object==nil)
{
[self release];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
return object;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment