From 62e6997afce49902a13485905da18c9c120ffae7 Mon Sep 17 00:00:00 2001 From: Popax21 Date: Sun, 14 Apr 2024 18:28:08 +0200 Subject: [PATCH] Fix MMR leak fix --- Celeste.Mod.mm/MonoModRules.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Celeste.Mod.mm/MonoModRules.cs b/Celeste.Mod.mm/MonoModRules.cs index e4c74b4fd..a1b0b69da 100644 --- a/Celeste.Mod.mm/MonoModRules.cs +++ b/Celeste.Mod.mm/MonoModRules.cs @@ -46,7 +46,7 @@ public enum PatchTarget { public static readonly AssemblyNameReference CelesteAsmRef = new AssemblyNameReference("Celeste", new Version(1, 0, 0, 0)); public static readonly PatchTarget RulesPatchTarget; - public static readonly ModuleDefinition RulesModule; + public static ModuleDefinition RulesModule; static MonoModRules() { // Note: It may actually be too late to set this to false. @@ -92,7 +92,7 @@ static MonoModRules() { // Null out the rules module reference once we are done patching // Note that MonoMod loads a separate copy of the rules type for each mod we patch (:catresort:) // So this doesn't break anything, however it prevents leaking the rules module definition - MonoModRule.Modder.PostProcessors += () => RulesModule = null; + MonoModRule.Modder.PostProcessors += _ => RulesModule = null; } private static void InitCommonRules(MonoModder modder) {