Created
November 21, 2019 12:08
-
-
Save qy1010/627587c613f3e37be242b0a452e79ed0 to your computer and use it in GitHub Desktop.
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
//可以看出class_createInstance和alloc的不同 | |
id theObject = class_createInstance(NSString.class, sizeof(unsigned)); | |
id str1 = [theObject init]; | |
NSLog(@"%@", [str1 class]); | |
id str2 = [[NSString alloc] initWithString:@"test"]; | |
NSLog(@"%@", [str2 class]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment