如何卸载由System.load加载的dll(dll的路径) [英] How to unload a dll which gets loaded by System.load(path to dll)

查看:66
本文介绍了如何卸载由System.load加载的dll(dll的路径)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以卸载使用System.load()API调用加载到应用程序中的DLL.

Is there any way to unload a DLL which gets loaded in the application using System.load() API call.

推荐答案

您必须使用单独的

You have to use a separate ClassLoader to load the dll. The dll is only bound to the ClassLoader it was loaded with. When the ClassLoader isn't used anymore (means no references to the ClassLoader exist), the garbage collector will free your ClassLoader and unload your dll.

这篇关于如何卸载由System.load加载的dll(dll的路径)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆