Using static variable in android
- by michael
Hi,
In android, is it recommend to use static variable?
E.g, implement a Singleton pattern in Java, I usually do:
private static A the_instance;
public static A getInstance() {
if (the_instance == null) {
the_instance = new A();
}
return the_instance;
}
My question is when do that get free by android JVM?
Thank you.