-
Notifications
You must be signed in to change notification settings - Fork 488
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
8294589: MenuBarSkin: memory leak when changing skin #906
8294589: MenuBarSkin: memory leak when changing skin #906
Conversation
👋 Welcome back angorya! A progress list of the required criteria for merging this PR into |
modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/SkinMemoryLeakTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/SkinMemoryLeakTest.java
Outdated
Show resolved
Hide resolved
Webrevs
|
.../src/main/java/com/sun/javafx/scene/control/LambdaMultiplePropertyChangeListenerHandler.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Outdated
Show resolved
Hide resolved
I have a string feeling that this PR should go back to DRAFT state, pending a better listener helper implementation JDK-8294809. Also, this particular skin may need to get it's listeners refactored - I see two scene listeners which seems redundant. |
don't worry: you choose one of the hardest skins to fix as your first - only the comboXX are worse ;)
|
/reviewers 2 |
@kevinrushforth |
@hjohn : could you please take a look at this, since it had a non-trivial merge? thanks! |
/reviewers 2 |
@kevinrushforth |
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/SkinMemoryLeakTest.java
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
Outdated
Show resolved
Hide resolved
@aghaisas : would you please take a look? |
8294589.menubarskin.leak
8294589.menubarskin.leak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix looks good to me!
@andy-goryachev-oracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 2c18c18.
Your commit was automatically rebased without conflicts. |
@andy-goryachev-oracle Pushed as commit 2c18c18. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Fixed memory leak by using weak listeners and making sure to undo everything that has been done to MenuBar/Skin in dispose().
This PR depends on a new internal class ListenerHelper, a replacement for LambdaMultiplePropertyChangeListenerHandler.
See #908
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/906/head:pull/906
$ git checkout pull/906
Update a local copy of the PR:
$ git checkout pull/906
$ git pull https://git.openjdk.org/jfx pull/906/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 906
View PR using the GUI difftool:
$ git pr show -t 906
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/906.diff