Disposable

constructor(callOnDispose: () -> Unit)(source)

Creates a new disposable that calls the provided function on dispose.

Note that an asynchronous function is not awaited.

Parameters

callOnDispose

Function that disposes something.

Online Documentation