【发布时间】:2013-06-08 13:13:44
【问题描述】:
__weak NSString *strin = [[NSString alloc] initWithFormat:@"hey"] ;
NSLog(@"weak %@",strin); //returns weak (null)
__weak NSString *strin =@"hey";
NSLog(@"weak %@",strin); //returns weak hey
这两种sn-ps有什么区别。为什么第二个在分配弱时返回值?
【问题讨论】:
标签: iphone ios memory-management null automatic-ref-counting