Skip to content

Commit

Permalink
Fix MMR leak fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Popax21 authored and maddie480 committed Apr 20, 2024
1 parent f04700d commit 62e6997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Celeste.Mod.mm/MonoModRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 62e6997

Please sign in to comment.