Michael Long
Nov 24, 2023

--

Be interesting to see where you go with this.

One use case for weak self is the ability to save captures on the object itself, avoiding reference cycles. (Think Combine sink handlers.)

As such even if you wrap an inner completion handler, it's still going to have.that strong reference to self.

Be nice to have a general solution, but not if it doesn't work in all cases...

--

--

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)