• Products
  • Features
  • Mod Master
  • Download
  • Games
  • Blog
  • Pricing

DetourContext_Dispose_Fix

Autor:HamuniiLast updated:26/10/2025 23:20:584.9M28KB

PEAK DetourContext_Dispose_Fix-1-lagofast mod master

Mod Introduction

A BepInEx patcher to fix MonoMod.RuntimeDetour's DetourContext.Dispose not working.

DetourContext.Dispose Fix

This BepInEx Patcher applies the fix from Fix DetourContext.Dispose #102, which makes MonoMod.RuntimeDetour.DetourContext.Dispose work properly. This is only useful if you are using a version of MonoMod.RuntimeDetour which doesn't have this patch.

If the patcher doesn't find the IL code it is looking to patch, it will print Nothing to patch. to the BepInEx console. If this is the case, this patcher isn't needed.

Why This Matters

If you are using DetourContext, e.g.:

using(new DetourContext(){ Priority = 100 }) { On.StartOfRound.Awake += Hook_2; } On.StartOfRound.Awake += Hook_1;

The wouldn't dispose of itself, and would run before because it also got applied to it.
With this patcher, the DetourContext will dispose of itself and Hook 2 will run before Hook _ 1 like it should.

This tool is provided by the third party [bufftool]Attention icon

Download Mods For Free

Install LagoFast, start PEAK and play with the mods you love.