From a421b3e6e8bada89600c46d09714ca8c42749408 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Thu, 27 Feb 2020 19:56:34 -0600 Subject: [PATCH] Added `using` to a read assembly in Injector --- IPA.Injector/Injector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPA.Injector/Injector.cs b/IPA.Injector/Injector.cs index af82e74a..55fa3966 100644 --- a/IPA.Injector/Injector.cs +++ b/IPA.Injector/Injector.cs @@ -151,7 +151,7 @@ namespace IPA.Injector // this is a critical section because if you exit in here, CoreModule can die using var critSec = CriticalSection.ExecuteSection(); - var unityAsmDef = AssemblyDefinition.ReadAssembly(unityPath, new ReaderParameters + using var unityAsmDef = AssemblyDefinition.ReadAssembly(unityPath, new ReaderParameters { ReadWrite = false, InMemory = true, @@ -270,7 +270,7 @@ namespace IPA.Injector { injector.Debug("Applying anti-yeet patch"); - var ascAsmDef = AssemblyDefinition.ReadAssembly(ascPath, new ReaderParameters + using var ascAsmDef = AssemblyDefinition.ReadAssembly(ascPath, new ReaderParameters { ReadWrite = false, InMemory = true,