How to unload dll loaded by System.load (path to dll)

Is it possible to unload a DLL loaded into an application using the API call System.load ().

+3
source share
1 answer

To download the dll you need to use a separate ClassLoader . The DLL is bound only to the ClassLoader loader. When ClassLoader is no longer in use (meaning there are no links to ClassLoader), the garbage collector will free your ClassLoader and unload your DLL.

+4
source

Source: https://habr.com/ru/post/1718778/


All Articles