Created
May 14, 2012 17:07
-
-
Save bromanko/2695108 to your computer and use it in GitHub Desktop.
ARC or Not
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !__has_feature(objc_arc) | |
#define NonatomicRetainedSetToFrom(a, b) do{if(a!=b){[a release];a=[b retain];}}while(0) | |
#define NonatomicCopySetToFrom(a, b) do{if(a!=b){[a release];a=[b copy];}}while(0) | |
#else | |
#define NonatomicRetainedSetToFrom(a, b) do{if(a!=b){a=b;}}while(0) | |
#define NonatomicCopySetToFrom(a, b) do{if(a!=b){a=[b copy];}}while(0) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment