Skip to content

Commit

Permalink
Merge pull request #1 from crewos/improve-ending-observation
Browse files Browse the repository at this point in the history
Makes it so CWObservableNotificationCenterToken automatically removes…
  • Loading branch information
lickel authored Aug 2, 2019
2 parents c4f85f3 + cae3d84 commit 73610f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FetchRequests/Sources/Associations/CWObservableToken.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public class CWObservableNotificationCenterToken: CWObservableToken {
}
notificationCenter.removeObserver(existing)
}

deinit {
self.invalidate()
}
}

internal protocol KeyValueObservationToken {
Expand Down

0 comments on commit 73610f5

Please sign in to comment.