Created
June 3, 2013 09:54
-
-
Save odrobnik/5697208 to your computer and use it in GitHub Desktop.
using weak where possible ...
This file contains hidden or 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
#import <Availability.h> | |
#if __has_feature(objc_arc_weak) | |
#define DT_WEAK_IVAR_IF_SUPPORTED __weak | |
#define DT_WEAK_PROPERTY_IF_SUPPORTED weak | |
#elif __has_feature(objc_arc) | |
#define DT_WEAK_IVAR_IF_SUPPORTED __unsafe_unretained | |
#define DT_WEAK_PROPERTY_IF_SUPPORTED assign | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment