diff --git a/src/Consolonia.Core/Infrastructure/ConsoleWindow.cs b/src/Consolonia.Core/Infrastructure/ConsoleWindow.cs index 77770287..ce806ca6 100644 --- a/src/Consolonia.Core/Infrastructure/ConsoleWindow.cs +++ b/src/Consolonia.Core/Infrastructure/ConsoleWindow.cs @@ -334,6 +334,7 @@ private void OnConsoleOnResized() // dispatch to the UI thread Dispatcher.UIThread.Post(() => { + (PixelBuffer as IDisposable)?.Dispose(); PixelBuffer = new PixelBuffer(Console.Size); var size = new Size(Console.Size.Width, Console.Size.Height); Resized!(size, WindowResizeReason.Unspecified);