I'm building my first Android app.
I'm using an emulator in Android Studio to test it.
I encountered this issue: I launch the app with the "run" button, but when I close it in the emulator, Android Studio shows that it's still running, and I have to stop it manually with the "stop" button.
When this happens, I see this message in the console: W/System: A resource failed to call dispose.
I know that Java has an integrated garbage collector, but I don't know what that message means and what to do about it.
I think that this may be correlated to the method I use to temporarily store data that I need to use in later fragments: I store it in a companion object of an abstract class.
abstract class TempStore {
companion object {
lateinit var players: List<Player>
var gameObjects: MutableList<GameObject> = mutableListOf()
}
}
Thanks to who will help me.
