# SnapshotFlowManager

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/SnapshotFlow.kt+class:androidx.compose.runtime.SnapshotFlowManager) Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.11.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  @ExperimentalComposeRuntimeApi
  class SnapshotFlowManager
  ```

*** ** * ** ***

Orchestrates the observation of `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/Snapshot` state for `https://developer.android.com/reference/kotlin/androidx/compose/runtime/package-summary#snapshotFlow(kotlin.Function0)`s that are collected on the same thread.

Once a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/SnapshotFlowManager` is no longer needed, its `https://developer.android.com/reference/kotlin/androidx/compose/runtime/SnapshotFlowManager#dispose()` method should be called.

It is not safe to share a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/SnapshotFlowManager` instance across two `https://developer.android.com/reference/kotlin/androidx/compose/runtime/package-summary#snapshotFlow(kotlin.Function0)`s that collect in parallel on two different threads, but it is not a problem for a thread to run apply observers in parallel with another thread collecting a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/package-summary#snapshotFlow(kotlin.Function0)`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/package-summary#snapshotFlow(kotlin.Function0)` |   |

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/SnapshotFlowManager#SnapshotFlowManager()()` | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/SnapshotFlowManager#dispose()()` Disposes of this manager. | Cmn |

## Public constructors

### SnapshotFlowManager

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

```
SnapshotFlowManager()
```

## Public functions

### dispose

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

```
fun dispose(): Unit
```

Disposes of this manager. Disposing of a manager disconnects it from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/Snapshot` system, rendering it incapable of handling any subscriptions.

If this method is called after this manager has been disposed of, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` will be thrown.