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

Florian Kirmaier fkirmaier at openjdk.java.net
Sun Apr 11 15:48:12 UTC 2021


On Wed, 7 Apr 2021 13:39:47 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8263402
>>   Minor cleanup based on codereview
>
> The fix looks OK, although I left a question below about ensuring that there cannot be an NPE.
> 
> The test doesn't catch the bug on my system (Windows 10). Even when I run it without your fix, it passes. Is it platform-specific?

It shouldn't be platform-specific, 
but maybe there are some subtle differences 
in the ordering between CSS/layout/rendering, which can cause OS-specific differences.


As suggested, I've now changed the initial value also to be a WeakReference! 
This way, it's definitely easier to reason that the code still behaves the same.

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

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


More information about the openjfx-dev mailing list