Last active
August 29, 2015 13:56
-
-
Save itsthejb/8902125 to your computer and use it in GitHub Desktop.
Macro to suppress performSelector leak warning while executing an arbitrary block. Can yield a value.
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 SuppressPerformSelectorLeakWarningForExpression(expression) ({ \ | |
_Pragma("clang diagnostic push") \ | |
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \ | |
expression; \ | |
_Pragma("clang diagnostic pop") }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
id value = SuppressPerformSelectorLeakWarningForExpression([object performSelector:sel])