Given the hypothetical utility class, which is used only when setting up the program:
class MyUtils { private static MyObject myObject = new MyObject(); static boolean doStuff(Params... params) {
will myObject collect garbage when it is no longer in use, or will it depend on the life of the program?
java garbage-collection static static-members
Michael Deardeuff Jan 17 '09 at 9:02 2009-01-17 09:02
source share