-
Enhancement
-
Resolution: Fixed
-
P3
-
19
-
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.
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.