Skip to content

Commit

Permalink
Makes it so CWObservableNotificationCenterToken automatically removes…
Browse files Browse the repository at this point in the history
… observer when deinit'ing
  • Loading branch information
AdamPro13 committed Aug 2, 2019
1 parent c4f85f3 commit cae3d84
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 cae3d84

Please sign in to comment.