Merge branch 'develop' into 'master'

- Fix PNObject dealloc



See merge request !6
This commit is contained in:
Giuseppe Nucifora 2016-01-29 12:35:00 +00:00
commit d30dedcce6

View File

@ -323,9 +323,14 @@
- (void)dealloc
{
unsigned int propertyCount;
objc_property_t *properties = class_copyPropertyList([self class], &propertyCount);
for(int i = 0; i < propertyCount; i++)[self removeObserver:self forKeyPath:[NSString stringWithCString:property_getName(properties[i]) encoding:NSUTF8StringEncoding]];
NSDictionary *properties = [PNObject propertiesForClass:self.class];
for (NSString *propertyName in properties) {
[self removeObserver:self forKeyPath:propertyName];
}
}
@end