# RetainedEffectResult

Artifact: [androidx.compose.runtime:runtime-retain](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/retain/RetainedEffect.kt+class:androidx.compose.runtime.retain.RetainedEffectResult) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.10.0) Common/All
- Cmn

  ```
  interface RetainedEffectResult
  ```

*** ** * ** ***

The return type of a built `https://developer.android.com/reference/kotlin/androidx/compose/runtime/retain/RetainedEffect.composable#RetainedEffect(kotlin.Function1)`. This is created in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/retain/RetainedEffectScope#onRetire(kotlin.Function0)` clause and tracks the `onRetiredEffect` callback for internal usage.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/retain/RetainedEffectResult#retire()()` Called when the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/retain/RetainedEffect.composable#RetainedEffect(kotlin.Function1)` is retired from composition. | Cmn |

## Public functions

### retire

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.10.0)

```
fun retire(): Unit
```

Called when the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/retain/RetainedEffect.composable#RetainedEffect(kotlin.Function1)` is retired from composition. This should call the `onRetiredEffect` provided to `https://developer.android.com/reference/kotlin/androidx/compose/runtime/retain/RetainedEffectScope#onRetire(kotlin.Function0)`.