Skip to content

Conversation

@Maran23
Copy link
Member

@Maran23 Maran23 commented Sep 14, 2022

This PR fixes a memory leak in dnd code in the MouseHandler of a Scene.
The memory leak occurs after calling startFullDrag(). The fullPDRTmpTargetWrapper is then populated but never cleared.
Fix is to call clear() on the fullPDRTmpTargetWrapper, very similar to #448 (JDK-8264330).


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-8279214: Memory leak in Scene after dragging a cell

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 899

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 14, 2022

👋 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 openjdk bot added the rfr Ready for review label Sep 14, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 14, 2022

Webrevs

@kevinrushforth kevinrushforth self-requested a review September 17, 2022 17:04
@kevinrushforth kevinrushforth requested review from arapte and removed request for kevinrushforth November 4, 2022 20:34
Copy link
Member

@arapte arapte 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 too.
fullPDRTmpTargetWrapper gets cleared both before and after gesture.

@openjdk
Copy link

openjdk bot commented Nov 22, 2022

@Maran23 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:

8279214: Memory leak in Scene after dragging a cell

Reviewed-by: angorya, arapte

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 36 new commits pushed to the master branch:

  • 9819d45: 8297332: Remove easy warnings in javafx.base
  • 086dac0: 8297213: Robot capture tests should move mouse to corner of screen
  • e3e0dfd: 8297166: [TestBug] Fix some ignored unit test from TableViewTest
  • 626227d: 8296330: Tests: Add layout container snapping tests
  • 1ec06a8: 8206430: Use consistent pattern for startup in FX system tests
  • 74af45d: 8296556: Mark two RobotTest methods as unstable on HiDPI Windows systems
  • 6cc9c4d: 8297042: gradle -PBUILD_SDK_FOR_TEST=false fails with gradle 7.6
  • a13630f: 8268877: TextInputControlSkin: incorrect inputMethod event handler after switching skin
  • 7ec0852: 8291853: [CSS] ClassCastException in CssStyleHelper calculateValue
  • 5956950: 8285503: SwingNodeDnDMemoryLeakTest::testSwingNodeMemoryLeak fails sometimes
  • ... and 26 more: https://git.openjdk.org/jfx/compare/28f8fa9c20363ced9a94787ecfd45735b3e6b82e...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Ready to be integrated label Nov 22, 2022
@Maran23
Copy link
Member Author

Maran23 commented Nov 22, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Nov 22, 2022

Going to push as commit a0ea874.
Since your change was applied there have been 36 commits pushed to the master branch:

  • 9819d45: 8297332: Remove easy warnings in javafx.base
  • 086dac0: 8297213: Robot capture tests should move mouse to corner of screen
  • e3e0dfd: 8297166: [TestBug] Fix some ignored unit test from TableViewTest
  • 626227d: 8296330: Tests: Add layout container snapping tests
  • 1ec06a8: 8206430: Use consistent pattern for startup in FX system tests
  • 74af45d: 8296556: Mark two RobotTest methods as unstable on HiDPI Windows systems
  • 6cc9c4d: 8297042: gradle -PBUILD_SDK_FOR_TEST=false fails with gradle 7.6
  • a13630f: 8268877: TextInputControlSkin: incorrect inputMethod event handler after switching skin
  • 7ec0852: 8291853: [CSS] ClassCastException in CssStyleHelper calculateValue
  • 5956950: 8285503: SwingNodeDnDMemoryLeakTest::testSwingNodeMemoryLeak fails sometimes
  • ... and 26 more: https://git.openjdk.org/jfx/compare/28f8fa9c20363ced9a94787ecfd45735b3e6b82e...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 22, 2022
@openjdk openjdk bot closed this Nov 22, 2022
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels Nov 22, 2022
@openjdk
Copy link

openjdk bot commented Nov 22, 2022

@Maran23 Pushed as commit a0ea874.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@Maran23 Maran23 deleted the 8279214-memory-leak-scene branch August 4, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants