LoaderRefHolder

class LoaderRefHolder(loader: ThemeLoader, dispatcher: CoroutineDispatcher)

The class is responsible for notifying the style change to the ThemeManager Thread safe Start observing when refCount 0 Stop when refCount = 0

Constructors

Link copied to clipboard
constructor(loader: ThemeLoader, dispatcher: CoroutineDispatcher)

Types

Link copied to clipboard
interface RefMessage
Link copied to clipboard
data class Release(val ref: Any) : LoaderRefHolder.RefMessage
Link copied to clipboard
data class Retain(val ref: Any) : LoaderRefHolder.RefMessage

Functions

Link copied to clipboard
fun release(ref: Any)

Non suspend function to allow call from onCleared/onDestroy LoaderRefHolder will manage this operation

Link copied to clipboard
suspend fun retain(ref: Any)

Suspend function caller should manage suspendable call