when I declare and initialize a variable as static in my main activity and the activity gets destroyed. Can I still access the content of the variable?
For example t
I believe I finally found you a reference -
The garbage collector automatically cleans up unused objects. An object is unused if the program holds no more references to it. You can explicitly drop a reference by setting the variable holding the reference to null.
https://docs.oracle.com/javase/tutorial/java/javaOO/summaryclasses.html
To be clear, it is possible for static variables to remain initialized preventing the class to be properly garbage collected (aka a memory leak).