SingletonProvider

data class SingletonProvider<out Type : Any>(val singleton: Type) : Disposable, Function0<Type>

Wraps singletons registered in a Context, allowing to dispose them.

Parameters

singleton

will be always provided by this provider.

See also

Disposable

Constructors

Link copied to clipboard
constructor(singleton: Type)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun dispose()

Disposes of the singleton if it implements the Disposable interface.

Link copied to clipboard
open operator override fun invoke(): Type