dispose

open override fun dispose()

Unloads all assets. Blocks current thread until are assets are unloaded. Logs all disposing exceptions.

Prefer suspending dispose method that takes an error handler as parameter.

Calling dispose is not guaranteed to keep the eventual consistency of progress if dispose is called during asynchronous asset loading. If exact loading progress is crucial, prefer creating another instance of AssetStorage than reusing existing one that has been disposed.


suspend fun dispose(onError: (identifier: Identifier<*>, cause: Throwable) -> Unit)

Unloads all assets. Cancels loading of all scheduled assets. onError will be invoked on every caught disposing exception.

Calling dispose is not guaranteed to keep the eventual consistency of progress if dispose is called during asynchronous asset loading. If exact loading progress is crucial, prefer creating another instance of AssetStorage than reusing existing one that has been disposed.