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

RawNativeLibraries should allow multiple clients to load/unload the same library

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 19
    • Fix Version/s: 19
    • Component/s: core-libs
    • Labels:
      None

      Description

      RawNativeLibraries::load returns the same NativeLibrary instance of a given path if it's called multiple times. This means that multiple clients have to coordinate that the last one using the loaded library is the one to close the library by calling RawNativeLibraries::unload.

      This can be improved by delegating to the underlying platform-specific library loading mechanism e.g. dlopen/dlclose that keeps the reference count. So each call to RawNativeLibraries::load and unload is simply a call to dlopen and dlclose respectively. Each client of calling RawNativeLibraries::load is responsible for calling RawNativeLibraries::unload.

      This is the case for a different instance of RawNativeLibraries. This RFE is to improve the case when load/unload is called on the same RawNativeLibraries instance.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mchung Mandy Chung
              Reporter:
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: