Make cleanup registration more robust in ZIP Inflater/Deflater (enhancement of JDK-8193507)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 10
    • Component/s: core-libs
    • None
    • 10
    • generic
    • generic

      JDK-8193507 replaced finalization with Cleaner API for automatic native resource cleanup in ZIP Inflater/Deflater. The code could be improved with little effort to be more robust in situations when Clenaer.register fails with OutOfMemoryError due to the need to allocate object(s). Simply moving the native resource allocation after the Cleaner.register achieves the desired effect.

            Assignee:
            Peter Levart
            Reporter:
            Peter Levart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: