Skip to content

Commit

Permalink
Merge pull request #540 from CreateAndInject/Clean-moduleSearchPaths
Browse files Browse the repository at this point in the history
Clean moduleSearchPaths
  • Loading branch information
wtfsck authored Jan 24, 2024
2 parents 3426764 + 9247e2c commit 2cffa15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DotNet/AssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ public bool Remove(AssemblyDef asm) {
#if THREAD_SAFE
theLock.EnterWriteLock(); try {
#endif
if (asm.ManifestModule is { } module)
moduleSearchPaths.Remove(module);
return cachedAssemblies.Remove(asmKey);
#if THREAD_SAFE
} finally { theLock.ExitWriteLock(); }
Expand All @@ -355,6 +357,7 @@ public void Clear() {
#endif
asms = new List<AssemblyDef>(cachedAssemblies.Values);
cachedAssemblies.Clear();
moduleSearchPaths.Clear();
#if THREAD_SAFE
} finally { theLock.ExitWriteLock(); }
#endif
Expand Down

0 comments on commit 2cffa15

Please sign in to comment.