winter-androidx-lifecycle / io.jentz.winter.androidx.lifecycle / io.jentz.winter.Graph / autoDispose

autoDispose

fun Graph.autoDispose(lifecycleOwner: LifecycleOwner, disposeEvent: Event = Event.ON_DESTROY): Unit

Automatically dispose this Graph when disposeEvent is emitted by androidx.lifecycle.Lifecycle.

Parameters

lifecycleOwner - The LifecycleOwner to observe.

disposeEvent - The Event which dispose the graph.