Add dispose

This commit is contained in:
Jack251970 2025-04-09 12:33:22 +08:00
parent c035b65517
commit e07beb2261

View file

@ -13,7 +13,7 @@ using Keys = System.Windows.Forms.Keys;
namespace Flow.Launcher.Plugin.Shell
{
public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu
public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu, IDisposable
{
private static readonly string ClassName = nameof(Main);
@ -442,5 +442,10 @@ namespace Flow.Launcher.Plugin.Shell
return results;
}
public void Dispose()
{
Context.API.RemoveGlobalKeyboardCallback(API_GlobalKeyboardEvent);
}
}
}