diff --git a/Classes/DPPPropertyAttribute.m b/Classes/DPPPropertyAttribute.m index 58a8fd2..25c4233 100644 --- a/Classes/DPPPropertyAttribute.m +++ b/Classes/DPPPropertyAttribute.m @@ -26,7 +26,7 @@ - (id) initWithClass:(id)class propertyName:(NSString*)propertyName return self; const char *p = attrs; - char retentionMethod; + char retentionMethod = 0; BOOL atomic = YES; BOOL weak = NO; do diff --git a/Classes/NSObject+DProperty.m b/Classes/NSObject+DProperty.m index 79dc9e0..800dd6b 100644 --- a/Classes/NSObject+DProperty.m +++ b/Classes/NSObject+DProperty.m @@ -208,12 +208,10 @@ + (NSMutableDictionary*)DPP_keysDictionary { NSMutableDictionary *dict = objc_getAssociatedObject(self, &DPPPropertyDictionaryKey); if(dict == nil){ - @synchronized(dict){ - dict = objc_getAssociatedObject(self, &DPPPropertyDictionaryKey); - if(dict == nil){ - dict = [NSMutableDictionary dictionary]; - self.DPP_keysDictionary = dict; - } + dict = objc_getAssociatedObject(self, &DPPPropertyDictionaryKey); + if(dict == nil){ + dict = [NSMutableDictionary dictionary]; + self.DPP_keysDictionary = dict; } } return dict;