We need to garbage collect between iterations of the outside loop in
bufSizeTest() in order to avoid exhausting the heap when running with
Java 6 (which is still used on Linux to test the 32-bit version of
libjpeg-turbo in automated builds.)
/*
- * Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011-2016 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
else
tjc.compress(dstBuf, 0);
}
+ dstImage = null;
+ dstBuf = null;
+ System.gc();
}
}
System.out.println("Done. ");