I got a singleton class in my application, which is defined just somewhat like:
public class SingletonTest {
private SingletonTest() {}
private static SingletonTest instance = new SingletonTest();
public static SingletonTest getInstance() {
return instance;
}
}
When I exit my application and open again, the instance has not been initialized again because the former one is not destroyed and still in JVM. But what I want is to initialize the static field every time I enter my application. So, what should I do in the onDestroy() method? Thanks a lot!