I have a piece of code that load a very big image in memory. So it seemed like a reasonable thing to call
System.gc();
before loading the
Ensure that the large objects can be gc'ed as early as possible. I.e. set variables to null and/or let them fall out of scope. THis helps!