mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
remove unnecessary manual dispose calls in weaver
This commit is contained in:
parent
5c850aa9ca
commit
7b57830e6c
@ -580,8 +580,6 @@ static bool Weave(string assName, IEnumerable<string> dependencies, IAssemblyRes
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (CurrentAssembly.MainModule.SymbolReader != null)
|
||||
CurrentAssembly.MainModule.SymbolReader.Dispose();
|
||||
Weaver.Error(ex.Message);
|
||||
throw ex;
|
||||
}
|
||||
@ -589,8 +587,6 @@ static bool Weave(string assName, IEnumerable<string> dependencies, IAssemblyRes
|
||||
|
||||
if (WeavingFailed)
|
||||
{
|
||||
if (CurrentAssembly.MainModule.SymbolReader != null)
|
||||
CurrentAssembly.MainModule.SymbolReader.Dispose();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -608,16 +604,12 @@ static bool Weave(string assName, IEnumerable<string> dependencies, IAssemblyRes
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("ProcessPropertySites exception: " + e);
|
||||
if (CurrentAssembly.MainModule.SymbolReader != null)
|
||||
CurrentAssembly.MainModule.SymbolReader.Dispose();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (WeavingFailed)
|
||||
{
|
||||
//Log.Error("Failed phase II.");
|
||||
if (CurrentAssembly.MainModule.SymbolReader != null)
|
||||
CurrentAssembly.MainModule.SymbolReader.Dispose();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -627,9 +619,6 @@ static bool Weave(string assName, IEnumerable<string> dependencies, IAssemblyRes
|
||||
WriterParameters writeParams = Helpers.GetWriterParameters(readParams);
|
||||
CurrentAssembly.Write(dest, writeParams);
|
||||
}
|
||||
|
||||
if (CurrentAssembly.MainModule.SymbolReader != null)
|
||||
CurrentAssembly.MainModule.SymbolReader.Dispose();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user