Skip to content

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
Contributor

@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
Contributor

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants