diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-03-17 10:13:17 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-03-17 10:13:17 +0000 |
commit | c72adb63de53251d04a9ffa2b08c75fb6d876d1a (patch) | |
tree | 2a558eb4bf4c174fb751c9010097d193a5a5914b /java | |
parent | 8d37c29d47e1e0a2d617849ae9896a5e47b9ad65 (diff) |
Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1180 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'java')
-rw-r--r-- | java/TJBench.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/java/TJBench.java b/java/TJBench.java index 7df0ce2..e0ca148 100644 --- a/java/TJBench.java +++ b/java/TJBench.java @@ -189,6 +189,9 @@ class TJBench { } tjd = null; + for (i = 0; i < jpegBuf.length; i++) + jpegBuf[i] = null; + jpegBuf = null; jpegSize = null; System.gc(); if (quiet != 0) @@ -430,11 +433,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; } } |