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

Properly dispose tab/title-based resources on tab close #14359

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

martin-fleck-at
Copy link
Contributor

What it does

The complete tabs model is only disposed and re-created whenever we we need to initialize it (no groups are available), we detect a broken state (we cannot find a tab that should be present) or when the overall tab groups have changed. This re-creation disposes the listeners we have on the current tab bars. However, in this group of listeners we also have some listeners that are only related to a particular tab/widget/title and they do not get properly disposed when a single tab is closed. The goal of this PR is to fix this.

Fixes #14203

How to test

  • Use the Chrome Developer Tools to make Memory snapshots and observe the behavior of closing and opening tabs over time.
  • Some resources are cleaned but you can observe that after closing all tabs after having several open, we have memory X and after opening a single tab again the memory is less than X because we triggered the re-creation of the tabs model.
  • In the new version the memory size should naturally follow the number of open tabs.

Follow-ups

Review checklist

Reminder for reviewers

@martin-fleck-at
Copy link
Contributor Author

@dfriederich FYI

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.

Thanks, looks good to me 👍

@msujew msujew added quality issues related to code and application quality plug-in system issues related to the plug-in system labels Oct 29, 2024
@martin-fleck-at martin-fleck-at merged commit f29c3d0 into master Oct 29, 2024
11 checks passed
@martin-fleck-at martin-fleck-at deleted the issues/14203 branch October 29, 2024 11:16
@github-actions github-actions bot added this to the 1.55.0 milestone Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system quality issues related to code and application quality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

The TabsMainImpl class leaks references until group changes
2 participants