- Fi PNObject dealloc
This commit is contained in:
parent
35c7b7ed68
commit
7de50f7833
@ -323,9 +323,14 @@
|
|||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
unsigned int propertyCount;
|
|
||||||
objc_property_t *properties = class_copyPropertyList([self class], &propertyCount);
|
NSDictionary *properties = [PNObject propertiesForClass:self.class];
|
||||||
for(int i = 0; i < propertyCount; i++)[self removeObserver:self forKeyPath:[NSString stringWithCString:property_getName(properties[i]) encoding:NSUTF8StringEncoding]];
|
|
||||||
|
for (NSString *propertyName in properties) {
|
||||||
|
|
||||||
|
[self removeObserver:self forKeyPath:propertyName];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user