From bb83fe67e0027d93c0d04d921163efa0e414b047 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Wed, 1 May 2019 02:38:18 +0800 Subject: [PATCH] Remove FreeLibrary call to unload CoreCLR (#24317) --- src/coreclr/hosts/coreconsole/coreconsole.cpp | 9 --------- src/coreclr/hosts/corerun/corerun.cpp | 9 --------- 2 files changed, 18 deletions(-) diff --git a/src/coreclr/hosts/coreconsole/coreconsole.cpp b/src/coreclr/hosts/coreconsole/coreconsole.cpp index e3813d4..a321f8b 100644 --- a/src/coreclr/hosts/coreconsole/coreconsole.cpp +++ b/src/coreclr/hosts/coreconsole/coreconsole.cpp @@ -176,15 +176,6 @@ public: } } - ~HostEnvironment() { - if(m_coreCLRModule) { - // Free the module. This is done for completeness, but in fact CoreCLR.dll - // was pinned earlier so this call won't actually free it. The pinning is - // done because CoreCLR does not support unloading. - ::FreeLibrary(m_coreCLRModule); - } - } - bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { if (!m_tpaList.CStr()) return false; diff --git a/src/coreclr/hosts/corerun/corerun.cpp b/src/coreclr/hosts/corerun/corerun.cpp index e1864c8..4f06da7 100644 --- a/src/coreclr/hosts/corerun/corerun.cpp +++ b/src/coreclr/hosts/corerun/corerun.cpp @@ -152,15 +152,6 @@ public: } } - ~HostEnvironment() { - if(m_coreCLRModule) { - // Free the module. This is done for completeness, but in fact CoreCLR.dll - // was pinned earlier so this call won't actually free it. The pinning is - // done because CoreCLR does not support unloading. - ::FreeLibrary(m_coreCLRModule); - } - } - bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { if (m_tpaList.IsEmpty()) return false; -- 2.7.4