Last active
December 11, 2015 21:39
-
-
Save sebreh/4664197 to your computer and use it in GitHub Desktop.
Shorthand macros for creating weak references.
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
#define SR_WEAK(obj) __typeof__(obj) __weak | |
#define SR_WEAK_SELF SR_WEAK(self) | |
// Usage: | |
// SR_WEAK_SELF weakSelf = self; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment