Skip to content

Commit

Permalink
Fix: warning about disposing the hotkeys context
Browse files Browse the repository at this point in the history
  • Loading branch information
jsakamoto committed Jun 11, 2024
1 parent b4ec7f0 commit a9c9bff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CUIFlavoredPortfolioSite/App.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace CUIFlavoredPortfolioSite;

public partial class App : IDisposable
public partial class App : IAsyncDisposable
{
public enum RuntimeModes
{
Expand Down Expand Up @@ -178,8 +178,9 @@ private async ValueTask ProcessCommandLineAsync(string commandLineInputText, boo
}
}

public void Dispose()
public async ValueTask DisposeAsync()
{
this._HotKeysContext?.Dispose();
GC.SuppressFinalize(this);
if (this._HotKeysContext is not null) await this._HotKeysContext.DisposeAsync();
}
}

0 comments on commit a9c9bff

Please sign in to comment.