RFR: 8263402: MemoryLeak: Node hardreferences it's previous Parent after csslayout and getting removed from the scene [v2]

Florian Kirmaier fkirmaier at openjdk.java.net
Fri Mar 12 16:14:24 UTC 2021


> Fixing a memory leak. 
> A node hard references its old parent after CSS layout and getting removed. 
> This shouldn't be the case, this is very counterintuitive.
> 
> The fix uses a WeakReference in CSSStyleHelper for firstStyleableAncestor.
> This should be fine because the CSS should only depend on it if it's still the real parent. 
> In that case, it doesn't get collected.

Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:

  8263402
  Added new verison of the unit-test

-------------

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/424/files
  - new: https://git.openjdk.java.net/jfx/pull/424/files/7f7b4569..b39db419

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=424&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=424&range=00-01

  Stats: 41 lines in 1 file changed: 15 ins; 23 del; 3 mod
  Patch: https://git.openjdk.java.net/jfx/pull/424.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/424/head:pull/424

PR: https://git.openjdk.java.net/jfx/pull/424


More information about the openjfx-dev mailing list