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

Kevin Rushforth kcr at openjdk.java.net
Wed Mar 10 22:33:07 UTC 2021


On Wed, 10 Mar 2021 22:25:32 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

> 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.

Since this touches CSS, it needs a second reviewer.

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

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


More information about the openjfx-dev mailing list