Combine is not a part of the open-source Swift project and is not therefore within the scope of the Swift Evolution process. I think there may be ways to offer suggestions to Apple.
I don't see any memory leak in your example. You return a publisher that retains the Service, but you didn't include any code that makes the Service retain the publisher.
Interesting point. Maybe I should rethink current Service model.
However, in outer code it would be used as:
class ViewModel {
private var service: Service = .init()
var subscription: AnyCancellable?
func setup() {
self.subscription = self.service.myPublisher().sink{ (value) in
// process value from publisher.
}
}
}