Created
August 8, 2013 21:03
-
-
Save mkuliszkiewicz/6188705 to your computer and use it in GitHub Desktop.
Suppress "may perform leak" warning. Author http://stackoverflow.com/users/415303/scott-thompson | Post : http://stackoverflow.com/questions/7017281/performselector-may-cause-a-leak-because-its-selector-is-unknown/7933931#7933931
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
// This goes in some global header, let it be *.pch | |
#define SuppressPerformSelectorLeakWarning(Stuff) \ | |
do { \ | |
_Pragma("clang diagnostic push") \ | |
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \ | |
Stuff; \ | |
_Pragma("clang diagnostic pop") \ | |
} while (0) | |
// And then in any method you just call this function | |
SuppressPerformSelectorLeakWarning( | |
.. | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment