dispose
Disposes of all Disposable singletons and providers registered in the context and removes them. Note that if registered provider provides Disposable instances, but it does not track the resources and does not implement Disposable itself, the provided assets will not be disposed by this method. Context does not track all injected assets: only directly registered objects are disposed. clear is called after all assets are disposed. Errors are caught and logged.
bindSingleton(SpriteBatch()) // SpriteBatch would be disposed.
bind { BitmapFont() } // Each provided BitmapFont would have to be disposed manually.
Content copied to clipboard