Reputation:
I am writing a JNI program and I want to unload the dll after i hava finished using it.
What can I do for this purpose? I couldn't find a unloadLibrary()
method in the Javadoc.
Upvotes: 9
Views: 4410
Reputation: 29322
There is no direct way of manually unloading your dll.
Put simply, your dll will be unloaded when the ClassLoader of the Class that loaded your jni-dll is handled by the garbage collector.
Upvotes: 6