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