@interface Person : NSObject @propert...
发布于 2022-03-03 16:13:37
@interface Person : NSObject
@property(nonatomic,retain)NSString * name
@end
上面声明一个Person类
Person * per = [[Person alloc] init]
per.name = [[NSString alloc] initWithFormat:@"张三"]
NSLog(@"per.name = %d",[per.name retainCount])
@property(nonatomic,retain)NSString * name
@end
上面声明一个Person类
Person * per = [[Person alloc] init]
per.name = [[NSString alloc] initWithFormat:@"张三"]
NSLog(@"per.name = %d",[per.name retainCount])
登录后免费查看答案
关注者
0
被浏览
41