Skip to content

Commit

Permalink
fix(datastore): memory leak in ModelSyncedEventEmitter (#3675)
Browse files Browse the repository at this point in the history
* fix(datastore): memory leak in ModelSyncedEventEmitter

* resolve lint comments
  • Loading branch information
5d authored May 7, 2024
1 parent dd64b90 commit cd5545b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ final class ModelSyncedEventEmitter {
self.syncOrchestratorSink = initialSyncOrchestrator?
.publisher
.receive(on: queue)
.filter(filterSyncOperationEvent(_:))
.filter { [weak self] in self?.filterSyncOperationEvent($0) == true }
.sink(receiveCompletion: { _ in },
receiveValue: { [weak self] value in
self?.onReceiveSyncOperationEvent(value: value)
Expand All @@ -74,7 +74,7 @@ final class ModelSyncedEventEmitter {
self.reconciliationQueueSink = reconciliationQueue?
.publisher
.receive(on: queue)
.filter(filterReconciliationQueueEvent(_:))
.filter { [weak self] in self?.filterReconciliationQueueEvent($0) == true }
.sink(receiveCompletion: { _ in },
receiveValue: { [weak self] value in
self?.onReceiveReconciliationEvent(value: value)
Expand Down

0 comments on commit cd5545b

Please sign in to comment.