From 8361e714f1a224073090185d3801112cefe22344 Mon Sep 17 00:00:00 2001 From: "Jean-Baptiste L." Date: Fri, 1 May 2026 02:14:39 +0200 Subject: [PATCH] Plugin.Stop: dispose the current step before clearing it When the user clicks "Close" on the End step, Plugin.Stop() sets CurrentStep to null without calling Dispose on it first. EndStep owns an EmbedIO WebServer bound to localhost:42073 (started in Run, torn down in Dispose), so the server keeps listening on the port for the rest of the game session and the step's resources leak. Other steps that subscribe to events in their constructor (e.g. PlaytimeStep, which hooks ChatGui.ChatMessage) leak in the same way if Stop is called before they complete naturally. Call CurrentStep?.Dispose() before nulling the field so the step releases what it owns. --- Auracite/Plugin.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Auracite/Plugin.cs b/Auracite/Plugin.cs index ea2be56..bcfcc4f 100644 --- a/Auracite/Plugin.cs +++ b/Auracite/Plugin.cs @@ -94,6 +94,7 @@ private void NextStep() public void Stop() { + CurrentStep?.Dispose(); CurrentStep = null; StepWindow.IsOpen = false; package = null;