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

8341687: Memory leak in TableView after interacting with TableMenuButton #1640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Maran23
Copy link
Member

@Maran23 Maran23 commented Nov 16, 2024

There are multiple issues in the TableMenu logic that result in a memory leak.

The following problems are now fixed with this PR:

  • The listener, that is registered to the col.visibleProperty() was not weak nor was it ever unregistered
    • The fix is to do pretty much the same that was already done with the col.textProperty() listener
  • The col.visibleProperty() and col.textProperty() where added again and again and again to the column when the columns changed (which happens when toggling the visibility).
    • The fix is to add the listeners once - when the MenuItem is created. This way, when the TableMenu is rebuild and the cached MenuItem is used, the whole listener logic is not run again for the column

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8341687: Memory leak in TableView after interacting with TableMenuButton (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1640/head:pull/1640
$ git checkout pull/1640

Update a local copy of the PR:
$ git checkout pull/1640
$ git pull https://git.openjdk.org/jfx.git pull/1640/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1640

View PR using the GUI difftool:
$ git pr show -t 1640

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1640.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 16, 2024

👋 Welcome back mhanl! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 16, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Ready for review label Nov 16, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 16, 2024

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Ready for review
Development

Successfully merging this pull request may close these issues.

1 participant