Skip to content

Instantly share code, notes, and snippets.

@justin
Created April 4, 2012 06:53
Show Gist options
  • Save justin/2299353 to your computer and use it in GitHub Desktop.
Save justin/2299353 to your computer and use it in GitHub Desktop.
ARC Helper Macro Sample
- (id)initWithUserName:(NSString *)userName key:(NSString *)apiKey delegate:(id <SGMimiMailerDelegate>)delegate
{
if ((self = [super init]))
{
_userName = SG_RETAIN(userName);
_apiKey = SG_RETAIN(apiKey);
_delegate = delegate;
}
return self;
}
- (void)dealloc
{
_delegate = nil;
SG_RELEASE(_userName);
SG_RELEASE(_apiKey);
SG_RELEASE(_responseData);
SG_RELEASE(_connection);
SG_SUPER_DEALLOC;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment