I have the code below.
I'm wondering that does the self.value
and _value
have some difference about thread safety strategy?
//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
No comments:
Post a Comment