//reactivestate-core/com.ensody.reactivestate/DisposableValue
DisposableValue¶
[common]\ class DisposableValue<T>(val value: T, disposer: () -> Unit) : DisposableHandle
A value that must be explicitly disposed when it’s not needed anymore.
Constructors¶
DisposableValue | [common] constructor(value: T, disposer: () -> Unit) |
Properties¶
Name | Summary |
---|---|
value | [common] val value: T |
Functions¶
Name | Summary |
---|---|
dispose | [common] open override fun dispose() |
disposeOnCompletionOf | [common] fun Disposable.disposeOnCompletionOf(launcher: CoroutineLauncher): Disposable Disposes the Disposable when CoroutineLauncher completes (including cancellation). [common] fun Disposable.disposeOnCompletionOf(context: CoroutineContext): Disposable Disposes the Disposable when CoroutineContext completes (including cancellation). [common] fun Disposable.disposeOnCompletionOf(scope: CoroutineScope): Disposable Disposes the Disposable when CoroutineScope completes (including cancellation). [common] fun Disposable.disposeOnCompletionOf(job: Job): Disposable Disposes the Disposable when Job completes (including cancellation). |