fix issue with early-deallocated CoreStoreObjects

This commit is contained in:
John Estropia committed 2018-09-18 23:50:14 +09:00
1 parent 40f458a09c
commit ab40532801
8 files changed
+86 -86

No files matched your search

+3 -3
View File
@@ -93,7 +93,7 @@ open /*abstract*/ class CoreStoreObject: DynamicObject, Hashable {
}
if lhs.isMeta {
return type(of: lhs) == type(of: rhs)
return cs_dynamicType(of: lhs) == cs_dynamicType(of: rhs)
}
return lhs.rawObject!.isEqual(rhs.rawObject!)
}
@@ -124,10 +124,10 @@ open /*abstract*/ class CoreStoreObject: DynamicObject, Hashable {
switch child.value {
case let property as AttributeProtocol:
property.parentObject = parentObject
property.rawObject = parentObject.rawObject
case let property as RelationshipProtocol:
property.parentObject = parentObject
property.rawObject = parentObject.rawObject
default:
continue