winter-androidx-lifecycle / io.jentz.winter.androidx.lifecycle / androidx.lifecycle.LifecycleOwner / autoDisposeGraph

autoDisposeGraph

fun LifecycleOwner.autoDisposeGraph(disposeEvent: Event = Event.ON_DESTROY): Unit

Automatically call WinterInjection.disposeGraph with this when disposeEvent is emitted by androidx.lifecycle.Lifecycle.

This will use WinterAware.injection if the LifecycleOwner implements WinterAware otherwise it will fallback to the default implementation Injection.

Parameters

disposeEvent - The Event that will dispose the graph.