Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in DockPanelRenderer and ToolbarAwareTabBar #13327

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

Hanksha
Copy link
Contributor

@Hanksha Hanksha commented Jan 29, 2024

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

Reminder for reviewers

The DockerPanelRenderer was not disposing the core preference listener.
The ToolbarAwareTabBar was not disposing the TabBarToolbar.

Signed-off-by: Vivien Jovet <[email protected]>
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

I was able to replicate the issue on master using the provided test and can confirm that the issue has been addressed.

@msujew msujew merged commit f6c8fe5 into eclipse-theia:master Feb 20, 2024
13 of 14 checks passed
@Hanksha Hanksha deleted the GH-13323-fix-memory-leaks branch February 20, 2024 17:12
@jfaltermeier jfaltermeier added this to the 1.47.0 milestone Feb 29, 2024
This was referenced Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Memory leak due to DockPanelRenderer
4 participants