且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从非托管应用程序中卸载默认的.NET AppDomain

更新时间:2023-11-22 16:52:52

文档中对此进行了描述,其中它指出:此方法不会向主机释放资源,卸载应用程序域或破坏线程.您必须终止进程才能释放这些资源."

This question was answered on the MSDN Forums and unfortunately it appears that this is not possible and that a process must be terminated to release resources including app domains. This is described in the documentation for the ICLRRuntimeHost.Stop interface method where it states "This method does not release resources to the host, unload application domains, or destroy threads. You must terminate the process to release these resources."