-
Bug
-
Resolution: Unresolved
-
P4
-
26
-
None
https://bugs.openjdk.org/browse/JDK-8277585 will remove the finalization support from javax.imageio.stream classes.
javax.imageio.stream.MemoryCacheImageInputStream does not actually use finalization - it uses a disposer / cleaner.
But all that does is clear a memory cache which is an ArrayList of byte[]
I don't see why that needs disposing.
So we can just get rid of it.
javax.imageio.stream.MemoryCacheImageOutputStream does use finalize() but that's because in close() it wants to flush() the stream as well.
However afterJDK-8277585 when finalize is no longer used, it will be in the same situation as the input stream.
I think we can just get rid of dispose for both of these - and in fact I didn't add a disposer to MemoryCacheImageOutputStream so that part is already done !
javax.imageio.stream.MemoryCacheImageInputStream does not actually use finalization - it uses a disposer / cleaner.
But all that does is clear a memory cache which is an ArrayList of byte[]
I don't see why that needs disposing.
So we can just get rid of it.
javax.imageio.stream.MemoryCacheImageOutputStream does use finalize() but that's because in close() it wants to flush() the stream as well.
However after
I think we can just get rid of dispose for both of these - and in fact I didn't add a disposer to MemoryCacheImageOutputStream so that part is already done !