Skip to content

Memory leak when activating extension via global hotkey #47199

@tanchekwei

Description

@tanchekwei

Microsoft PowerToys version

0.98.1

Installation method

PowerToys auto-update

Area(s) with issue?

Command Palette

Steps to reproduce

  1. Install Visual Studio / Code for Command Palette (latest version 1.26.0.0)
  2. Configure a global hotkey
  3. Trigger the extension using the global hotkey

✔️ Expected Behavior

Extension memory usage remains stable over time

❌ Actual Behavior

Memory usage keeps increasing, making extension activation slower with continued use of the command palette and eventually requiring a restart.

Upload Bug Report ZIP-file

No response

Other Software

I initially suspected the issue was caused by the extension.

However, after debugging, I confirmed that only GetItems is invoked when the extension is activated if there is no search text.

Refer to video below, there’s no search input and just keep activating extension via hotkey and memory keep growing from 8MB to 13MB

2026-04-24.22-32-29-1.1.mp4

From the extension code, since there is no search text, GetItems will always returns _combinedItemsCache, which shouldn’t lead to any memory leak.
https://github.com/tanchekwei/VisualStudioCodeForCommandPalette/blob/v1.26.0.0/WorkspaceLauncherForVSCode/Pages/VisualStudioCodePage.cs#L127-L157

Based on this, the extension code can likely be ruled out as the cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugSomething isn't workingNeeds-TriageFor issues raised to be triaged and prioritized by internal Microsoft teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions