I defined a static variable in my custom Application class. Something like this:
public class App extends Application{
...
public static Object var;
...
@Override
public void onCreate() {
var = new Object();
}
}
During my applications's Activities i need to read App.var value, but some times it seems to be null.
Is this possible that static variables of my App class destroyed (because of GC or anything else) during lifetime of my application? If yes, why?