just a safety measure for the rare case that the FRC delegate gets released earlier than the FRC

This commit is contained in:
John Estropia
2015-10-13 10:47:48 +09:00
parent 0b6298a802
commit 524757a7cf
2 changed files with 10 additions and 0 deletions

View File

@@ -924,6 +924,11 @@ public final class ListMonitor<T: NSManagedObject> {
try! fetchedResultsController.performFetch()
}
deinit {
self.fetchedResultsControllerDelegate.fetchedResultsController = nil
}
// MARK: Private

View File

@@ -198,6 +198,11 @@ public final class ObjectMonitor<T: NSManagedObject> {
self.lastCommittedAttributes = (self.object?.committedValuesForKeys(nil) as? [String: NSObject]) ?? [:]
}
deinit {
self.fetchedResultsControllerDelegate.fetchedResultsController = nil
}
// MARK: Private