Skip to content

Instantly share code, notes, and snippets.

@sgoodwin
Created August 26, 2011 20:39
Show Gist options
  • Save sgoodwin/1174380 to your computer and use it in GitHub Desktop.
Save sgoodwin/1174380 to your computer and use it in GitHub Desktop.
Lazy loading a variable.
- (NSMutableArray*)xArr{
if(_xArr){
return _xArry;
}
_xArr = [[NSMutableArray alloc] init];
return _xArr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment