Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6558368

(bf) MappedByteBuffer.release()/close() to release system resources

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P5
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      solaris_8

      Description

      A DESCRIPTION OF THE REQUEST :
      The current JRE release does not support releasing of a java.nio.MappedByteBuffer.

      Documentation says: "A mapped byte buffer and the file mapping that it represents remain valid until the buffer itself is garbage-collected."

      Therefore it is not possible to delete the underlying file on Windows, if has been mmap'd before (and the MappedByteBuffer has not been GC'd).


      JUSTIFICATION :
      Let java.nio.MappedByteBuffer implement the interface java.io.Closeable

      or

      add a method release().

      Either way should immediatly release all system resources referenced by the mapped byte buffer.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ryeung Roger Yeung (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: