Skip to content

Commit

Permalink
dispose of pixelbuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm committed Nov 30, 2024
1 parent d5092a5 commit ff89176
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Consolonia.Core/Infrastructure/ConsoleWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ private void OnConsoleOnResized()
// dispatch to the UI thread
Dispatcher.UIThread.Post(() =>
{
(PixelBuffer as IDisposable)?.Dispose();

Check warning on line 337 in src/Consolonia.Core/Infrastructure/ConsoleWindow.cs

View workflow job for this annotation

GitHub Actions / build

"[SuspiciousTypeConversion.Global] Suspicious cast: there is no type in the solution which is inherited from both 'Consolonia.Core.Drawing.PixelBufferImplementation.PixelBuffer' and 'System.IDisposable'" on /home/runner/work/Consolonia/Consolonia/src/Consolonia.Core/Infrastructure/ConsoleWindow.cs(337,38)
PixelBuffer = new PixelBuffer(Console.Size);
var size = new Size(Console.Size.Width, Console.Size.Height);
Resized!(size, WindowResizeReason.Unspecified);
Expand Down

0 comments on commit ff89176

Please sign in to comment.