-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
The lifetime of an observer (i.e., time until being unregistered) is currently determined by the context object passed to the observe(withContext:observer)
call and facilitated by the WeakApply
struct it is turned in. As an alternative, we might use the Observation
object produced by observe(withContext:observer)
by keeping it in a WeakBox
in the observers
array of Changing<Value>
.
This ought to simplify matters as we can get rid of explicitly mentioning context objects in the API (they can just be weak captures of the observer closures).
What would the impact of this change be on how chains of combinators are kept alive?