Skip to content

Commit

Permalink
Clean moduleSearchPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
CreateAndInject committed Jan 24, 2024
1 parent 3426764 commit 9247e2c
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 9247e2c

Please sign in to comment.