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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 19
    • 19
    • core-libs
    • None

      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.

            mchung Mandy Chung (Inactive)
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: