- when and how are these removed

Let’s say you are using the built-in .store(in:) method on AnyCancellable like so:

example(of: "removeDuplicates") {
  // 1
  let words = "hey hey there! want to listen to mister mister ?"
                  .components(separatedBy: " ")
  // 2
    .sink(receiveValue: { print($0) })
    .store(in: &subscriptions)

If you have an app that does this a lot - are these removed when the publishers complete?

I assume not - but wanted to double check. It also seems that this storage wouldn’t be thread-safe, correct?


@tourultimate Do you still have issues with this?

I haven’t tested to confirm but I’m basically working off of my assumptions above at this point. If somebody knows for sure, that would be helpful.