-
Notifications
You must be signed in to change notification settings - Fork 505
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
8259046: ViewPainter.ROOT_PATHS holds reference to Scene causing memory leak #388
8259046: ViewPainter.ROOT_PATHS holds reference to Scene causing memory leak #388
Conversation
👋 Welcome back kcr! A progress list of the required criteria for merging this PR into |
@kevinrushforth |
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.
I did ran full test and did some run some manual tests also. The changes look fine to me.
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.
Looks good to me.
@kevinrushforth 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 10 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 |
@kevinrushforth Since your change was applied there have been 10 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 676cf3e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Prism implements a dirty region optimization, where in many cases, only part of the scene graph is re-rendered when something changes. In support of this, the
ViewPainter
class in the Quantum Toolkit keeps an array of node paths,ROOT_PATHS
, which is a list of sub-trees in the scene graph that need to be rendered based on a change to that node. The entries in theROOT_PATHS
array are intended to be transient during the rendering of a single pass of a single scene. They are recreated every time a scene is rendered. The leak occurs because the entries are not cleared after being used. The fix is to clear each entry after it is rendered. In addition to static analysis, which shows that the entries are never used again after a frame is rendered, I have done a full build and test, including manual tests, to be sure that there is no regression.I have added a test that will fail consistently on Mac and Windows (and intermittently on Linux) without the fix. It passes consistently on all platforms with the fix.
Even though this is a simple change, it is in an area that has historically been fragile, so I would like two reviewers.
/reviewers 2
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/388/head:pull/388
$ git checkout pull/388