summaryrefslogtreecommitdiff
path: root/src/vm/method.hpp
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-01-09 22:21:03 +0100
committerGitHub <noreply@github.com>2019-01-09 22:21:03 +0100
commit660eb0018871a88049ed66a17817dcf72278c9d4 (patch)
treee623d1727b8d3450a638c0dc43135202db34f8b3 /src/vm/method.hpp
parent5478a2f17f58033c32a810526b4868cba7952f32 (diff)
downloadcoreclr-660eb0018871a88049ed66a17817dcf72278c9d4.tar.gz
coreclr-660eb0018871a88049ed66a17817dcf72278c9d4.tar.bz2
coreclr-660eb0018871a88049ed66a17817dcf72278c9d4.zip
Fix DynamicMethodDesc memory leak (#21891)
The DynamicMethodTable::AddMethodsToList was incorrectly allocating the MethodDescChunk from the domain's LoaderAllocator instead of the context specific one. Thus the allocated memory was leaking after a collectible AssemblyLoadContext was collected. There was also a problem with the DynamicMethodDesc::Destroy being called twice for collectible classes - once by RuntimeMethodHandle::Destroy() and once when the DomainFile destructor was called. Due to the primary issue, this problem was not visible, since the domain's LoaderAllocator is never unmapped. But it started to cause AV after the primary issue was fixed.
Diffstat (limited to 'src/vm/method.hpp')
-rw-r--r--src/vm/method.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm/method.hpp b/src/vm/method.hpp
index 1821b2aed4..68ed28f0bd 100644
--- a/src/vm/method.hpp
+++ b/src/vm/method.hpp
@@ -2423,7 +2423,7 @@ public:
//
// following implementations defined in DynamicMethod.cpp
//
- void Destroy(BOOL fDomainUnload = FALSE);
+ void Destroy();
};