Skip to content

Commit 53b3b7f

Browse files
committed
Only dispose in dispose function
1 parent a3d095f commit 53b3b7f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Flow.Launcher.Infrastructure/QuickSwitch/QuickSwitch.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ public static void SetupQuickSwitch(bool enabled)
175175
// Remove explorer windows
176176
foreach (var explorer in _quickSwitchExplorers.Keys)
177177
{
178-
_quickSwitchExplorers[explorer]?.Dispose();
179178
_quickSwitchExplorers[explorer] = null;
180179
}
181180

@@ -191,7 +190,6 @@ public static void SetupQuickSwitch(bool enabled)
191190
{
192191
if (_dialogWindow != null)
193192
{
194-
_dialogWindow.Dispose();
195193
_dialogWindow = null;
196194
dialogWindowExists = true;
197195
}
@@ -247,7 +245,6 @@ private static bool RefreshLastExplorer()
247245
var explorerWindow = explorer.CheckExplorerWindow(hWnd);
248246
if (explorerWindow != null)
249247
{
250-
_quickSwitchExplorers[explorer]?.Dispose();
251248
_quickSwitchExplorers[explorer] = explorerWindow;
252249
_lastExplorer = explorer;
253250
found = true;
@@ -503,7 +500,6 @@ uint dwmsEventTime
503500
if (explorerWindow != null)
504501
{
505502
Log.Debug(ClassName, $"Explorer window: {hwnd}");
506-
_quickSwitchExplorers[explorer]?.Dispose();
507503
_quickSwitchExplorers[explorer] = explorerWindow;
508504
_lastExplorer = explorer;
509505
break;

0 commit comments

Comments
 (0)