subscribeWeak

abstract fun <R : Any> subscribeWeak(owner: R, action: (owner: R, value: T) -> Unit)

Registers a weak subscriber that will be called when the value of this Provider changes. The subscriber will be automatically removed when the owner is garbage collected.

Registering a subscriber disables lazy evaluation of the provider.

The given value is not guaranteed to still be the current value at the time of invocation.