Michael Long
Jan 3, 2024

--

Should look into how AnyCancellable works. Adding the function as shown does nothing. AnyCancellable will call cancel on the subscription as soon as it goes out of scope, which would occur just as soon as DataFetcher goes out of scope.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)