Skip to content

fix: memory leak in getTerminalActionBarArgs#269516

Merged
meganrogge merged 4 commits intomicrosoft:mainfrom
SimonSiefke:fix/getTerminalActionBarArgs
Oct 8, 2025
Merged

fix: memory leak in getTerminalActionBarArgs#269516
meganrogge merged 4 commits intomicrosoft:mainfrom
SimonSiefke:fix/getTerminalActionBarArgs

Conversation

@SimonSiefke
Copy link
Contributor

Fixing a memory leak in getTerminalActionBarArgs by disposing the previous actions when updating the actions.

Before

When opening and closing the panel, many instances of getTerminalActionBarArgs are created:

terminal toggle

After

When opening and closing the panel, the number of getTerminalActionBarArgs functions stays constant:
terminal toggle


Only a leaking i function or class is remaining, which seems to be related to xterm addon WebGL.

{
  "namedFunctionCount3": [
    {
      "count": 2473,
      "delta": 2377,
      "name": "i",
      "sourceLocation": "vscode-file://vscode-app/home/simon/.cache/repos/vscode/node_modules/@xterm/addon-webgl/lib/addon-webgl.js:0:82918",
      "originalName": null
    }
  ],
  "isLeak": true
}
Copy link
Collaborator

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@meganrogge
Copy link
Collaborator

cc @Tyriar

@meganrogge meganrogge enabled auto-merge (squash) October 2, 2025 14:36
@meganrogge meganrogge added this to the September 2025 milestone Oct 2, 2025
@Tyriar Tyriar modified the milestones: September 2025, October 2025 Oct 3, 2025
@Tyriar Tyriar self-assigned this Oct 3, 2025
@meganrogge meganrogge merged commit 949dedd into microsoft:main Oct 8, 2025
17 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 22, 2025
@SimonSiefke SimonSiefke deleted the fix/getTerminalActionBarArgs branch January 15, 2026 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants