-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
The Inflater and Deflater classes require the caller to call end() after use, because these objects retain references to native memory. This is clearly documented. However, there is no way to use these classes with the try-with-resources statement, because they don't implement AutoCloseable.
These classes should implement a close() method that simply calls end(), and the classes should be retrofitted to implement AutoCloseable.
These classes should implement a close() method that simply calls end(), and the classes should be retrofitted to implement AutoCloseable.
- csr for
-
JDK-8343768 Inflater and Deflater should implement AutoCloseable
- Draft
- relates to
-
JDK-6911261 Project Coin: Retrofit Automatic Resource Management (ARM) support onto platform APIs
- Closed
-
JDK-6963723 Project Coin: Retrofit more JDK classes for ARM
- Closed
-
JDK-8066583 DeflaterOutputStream should explain responsibility for freeing resources
- Open
- links to
-
Review(master) openjdk/jdk/19675