Created
September 1, 2013 15:46
-
-
Save mlaster/6405290 to your computer and use it in GitHub Desktop.
- (void)testWeak {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" NSString *strong = @"foo"; __weak NSString *weak = strong; NSLog(@"weak: %@", weak); strong = nil; NSLog(@"weak: %@", weak);
#pragma clang diagnostic pop
}
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
- (void)testWeak { | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" | |
NSString *strong = @"foo"; | |
__weak NSString *weak = strong; | |
NSLog(@"weak: %@", weak); | |
strong = nil; | |
NSLog(@"weak: %@", weak); | |
#pragma clang diagnostic pop | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment