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
Whenever you use the reactive extensions in Signals or BindingTargets for these components, assume they would never deinitialize.
Limit the lifetime of your bindings using a third source, e.g. the superview, whenever:
the bindings must be teared down when the affected view hierarchy is removed; and
the source of the bindings would outlive the affected view hierarchy.
Example
This WOULD LEAK if the lifetime of your view model outlives view hierarchy, e.g. you reuse them.
mySwitch.isOn.isEnabled <~ viewModel.isEnabled
Therefore, the binding should be constrained with a lifetime from some others that are not affected by the issue. In the following snippet, it is the ancestor of mySwitch in the view hierarchy.
What's it about?
Several components are leaking in the iOS SDK. There is no competent workaround viable at the framework level to this.
Known Leaking Components
Suspected
Recommended Workaround
Whenever you use the reactive extensions in
Signal
s orBindingTarget
s for these components, assume they would never deinitialize.Limit the lifetime of your bindings using a third source, e.g. the superview, whenever:
Example
This WOULD LEAK if the lifetime of your view model outlives view hierarchy, e.g. you reuse them.
Therefore, the binding should be constrained with a lifetime from some others that are not affected by the issue. In the following snippet, it is the ancestor of
mySwitch
in the view hierarchy.Note
This is an iOS specific issue. tvOS is not affected.
The text was updated successfully, but these errors were encountered: