views:

579

answers:

2

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.

+4  A: 

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.

Silfverstrom
+1  A: 

JVM will manage unloading library so don't bother yourself :)

pir0