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

LibraryLookup should be more friendly with implicit unloading

XMLWordPrintable

      Dereferencing a segment from a LibraryLookup is possible, in the following form:

      LibraryLookup libLookup = ...
      MemorySegment segment = libLookup.lookup("foo").asSegmentRestricted(....)

      The above code has a problem: there is no link between the produced segment and the original library lookup - meaning that, in principle, it's possible for the library to be unloaded when dereference occurs.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: