diff --git a/java/TJBench.java b/java/TJBench.java index 8558699d..9bee6ee2 100644 --- a/java/TJBench.java +++ b/java/TJBench.java @@ -171,6 +171,9 @@ class TJBench { } tjd = null; + for (i = 0; i < jpegBuf.length; i++) + jpegBuf[i] = null; + jpegBuf = null; jpegSize = null; System.gc(); if (quiet != 0) @@ -401,11 +404,6 @@ class TJBench { decompTest(srcBuf, jpegBuf, jpegSize, tmpBuf, w, h, subsamp, jpegQual, fileName, tilew, tileh); - for (i = 0; i < ntilesw * ntilesh; i++) - jpegBuf[i] = null; - jpegBuf = null; jpegSize = null; - System.gc(); - if (tilew == w && tileh == h) break; } }