Last active
May 28, 2020 11:57
-
-
Save 623637646/3a2db30fcd00d53de7bb124fd309da8b to your computer and use it in GitHub Desktop.
ReactiveObjC 3.0.0 bug. when hook NSString dealloc method, NSString can't release. Updated: This is not ReactiveObjC bug. Refer to: https://stackoverflow.com/q/62064040/9315497
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
int i = 0; | |
while (YES) { | |
@autoreleasepool { | |
NSString *string = [[NSString alloc] initWithFormat:@"%d", i]; | |
// or | |
// NSString *string = [[NSString alloc] init]; | |
[[string rac_willDeallocSignal] subscribeCompleted:^{ | |
NSLog(@"obj dealloc"); | |
}]; | |
} | |
i++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment