mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Remove files caching from CachedPluginLoadContext, make it forward the call instead
This commit is contained in:
1 parent
40643ffdef
commit
4597be006e
1 file changed
+1
-7
@@ -15,7 +15,6 @@ internal class CachedPluginLoadContext : IPluginLoadContext, IDisposable
|
||||
public IPluginLoadContext PluginLoadContext { get; }
|
||||
private byte[] assemblyData;
|
||||
private byte[] assemblySymbolsData;
|
||||
private readonly Dictionary<string, byte[]> files = new();
|
||||
|
||||
public CachedPluginLoadContext(IPluginLoadContext pluginLoadContext)
|
||||
{
|
||||
@@ -36,18 +35,13 @@ internal class CachedPluginLoadContext : IPluginLoadContext, IDisposable
|
||||
|
||||
public byte[] GetFile(string relativePath)
|
||||
{
|
||||
if (!files.ContainsKey(relativePath))
|
||||
{
|
||||
files[relativePath] = PluginLoadContext.GetFile(relativePath);
|
||||
}
|
||||
return files[relativePath];
|
||||
return PluginLoadContext.GetFile(relativePath);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
assemblyData = null;
|
||||
assemblySymbolsData = null;
|
||||
files.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user