Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
friki data migration
Ranch Hand
Posts: 772
  • Mark post as helpful
  • send pies
  • Report post to moderator
How can you help the garbage collector?

By explicitely nulling references? By explicitely calling System.gc()? By reusing objects instead of instantiating new ones?

Interestingly, with modern JVMs (starting with Java 1.2), the answer to all the above questions is "no" in general - these "solutions" are more likely to do harm than to really help.

see "Java theory and practice: Garbage collection and performance":
    Bookmark Topic Watch Topic
  • New Topic