<div class='sourceset sourceset-android'>Android</div>

```kotlin
class DisposeOnLifecycleDestroyed(private val lifecycle: Lifecycle) : ViewCompositionStrategy
```

[ViewCompositionStrategy](/jetpack-compose/androidx.compose.ui/ui/interfaces/ViewCompositionStrategy) that disposes the composition when [lifecycle](#lifecycle) is
[destroyed]`Lifecycle.Event.ON_DESTROY`. This strategy is appropriate for Compose UI views
that share a 1-1 relationship with a known `LifecycleOwner`.

## Secondary Constructors

```kotlin
constructor(lifecycleOwner: LifecycleOwner) : this(lifecycleOwner.lifecycle)
```