theia
theia copied to clipboard
Fix memory leak in DockPanelRenderer and ToolbarAwareTabBar
What it does
This PR fixes a memory leak occurring in the DockPanelRenderer
and ToolbarAwareTabBar
when the user opened and closed a lot of tabs repeatedly. The DockPanelRenderer
was not disposing the core preferences listener when the ToolbarAwareTabBar
is disposed and the ToolbarAwareTabBar
itself didn't dispose the TabBarToolbar
when it is detached.
Fixes #13323
How to test
I've added a playwright test to test this issue in "/examples/playwright/src/tests/theia-application-shell.test.ts". Just remove the skip
and run the test then check the logs for memory leak warnings.
Review checklist
- [x] As an author, I have thoroughly tested my changes and carefully followed the review guidelines
Reminder for reviewers
- As a reviewer, I agree to behave in accordance with the review guidelines