Skip to content

Instantly share code, notes, and snippets.

@mtrovilho
Created March 11, 2013 19:07
Show Gist options
  • Save mtrovilho/5136785 to your computer and use it in GitHub Desktop.
Save mtrovilho/5136785 to your computer and use it in GitHub Desktop.
Suppress "perform selector may cause a leak" warning
// http://stackoverflow.com/questions/7017281/performselector-may-cause-a-leak-because-its-selector-is-unknown#answer-7933931
#define SuppressPerformSelectorLeakWarning(Method) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
Method; \
_Pragma("clang diagnostic pop") \
} while (0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment