I am building an Android application and I am using a static arraylist which I populate during the Splash Activity so that I can use it throughout my whole application. But when I am exiting and re-enter the application, this array remains full with its previous contents. What is happening please?
Share
If it’s static it will only be deleted if the class that holds it is completely unloaded from memory. That probably won’t happen immediately, but will at some point in the future. You should manually clear it when you know you don’t need it anymore. Or store the data somewhere else.
If you were to really kill your process via ADB (not just by exiting your activities), you will notice that the data will be gone.