Re:Chris Lattner on garbage collection vs. Automatic Referen...
by hmlongco on Tuesday April 26, 2022 @07:08PM
(#31174288)
Uhh... because I can see what was captured? If I'm overly concerned that a given callback might be held somewhere for all time I'll simply capture a weak reference and be done with it.
How do you reason about a closure that captures some stuff and gets passed to a library function? @escaping doesn’t give you enough information to reason about all lifetimes that could possibly matter.