Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.6_P01
-
Fix Version/s: 5.1
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:any
-
Support Case References:Support Case #12784 - https://icesoft.my.salesforce.com/5007000000dAoA6
Description
A customer has notice that we are not cleaning up tmp files when doing image captures.
"I run a unit test parsing many pdf documents and generating images for all pages in the documents.
The test leaks many files in my temp folder:
- ICEpdfTempFile*.tmp (only some)
- imageio*.tmp (many files)
The files are never deleted (not even when the test is done)"
Caching can be disabled with the system properties.
System.setProperty("org.icepdf.core.streamcache.enabled", "false");
ImageIO.setUseCache(false);"
However we should look into the why the various files are being kept around after the jvm shuts down. We should also do an audit to insure that the imageReader is being disposed correctly, http://info.michael-simons.eu/2012/01/25/the-dangers-of-javas-imageio/
"I run a unit test parsing many pdf documents and generating images for all pages in the documents.
The test leaks many files in my temp folder:
- ICEpdfTempFile*.tmp (only some)
- imageio*.tmp (many files)
The files are never deleted (not even when the test is done)"
Caching can be disabled with the system properties.
System.setProperty("org.icepdf.core.streamcache.enabled", "false");
ImageIO.setUseCache(false);"
However we should look into the why the various files are being kept around after the jvm shuts down. We should also do an audit to insure that the imageReader is being disposed correctly, http://info.michael-simons.eu/2012/01/25/the-dangers-of-javas-imageio/
I've done an audit on the imaging code and updated the reader and imageInputStreams to correctly dispose and class respectively.
On my windows machine I'm not seeing any extra files being left behind after running QA run or using the viewer. Perhaps the client can gives us more information on how they are using the api.