Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. @property (copy, nonatomic) NSString *someString;
  2.  
  3. - (void)setSomeString:(NSString *)someString
  4. {
  5. //option 1
  6. _someString = someString;
  7. //option 2
  8. _someString = [someString copy];
  9. //do other stuff
  10. }
  11.  
  12. @property (copy, nonatomic) NSString *someString;
  13.  
  14. _someString = [someString copy];
  15.  
  16. if(_someString) {
  17. [_someString release];
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement