< prev index next >
src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java
Print this page
rev 57619 : 7143743: (zipfs) Potential memory leak with zip provider
Summary: ZipFileSystem.close() now clears the "inodes" Map, to avoid holding on to potentially large amounts of data
Reviewed-by:
*** 487,496 ****
--- 487,499 ----
}
synchronized (deflaters) {
for (Deflater def : deflaters)
def.end();
}
+ // clear the inodes since they can potentially hold on to large amounts
+ // of data (especially IndexNode of type ZipFileSystem$Entry)
+ inodes.clear();
IOException ioe = null;
synchronized (tmppaths) {
for (Path p : tmppaths) {
try {
< prev index next >