You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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 theWeakApply
struct it is turned in. As an alternative, we might use theObservation
object produced byobserve(withContext:observer)
by keeping it in aWeakBox
in theobservers
array ofChanging<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?
The text was updated successfully, but these errors were encountered: