我有下面的代码。我想知道线程安全策略self.value
和_value
线程安全策略有什么区别吗?
//temp.h
@interface Temp:NSObject
@property(nonatomic, strong) NSInteger *value;
@end
//temp.m
@implementation Temp
@synthesize value = _value;
- (void)someMethod:(NSInteger)someValue {
self.value = someValue;
}
- (void)someOtherMethod:(NSObject *)someValue {
_value = someValue;
}
@end