RFR: 8294589: MenuBarSkin: memory leak when changing skin

Andy Goryachev angorya at openjdk.org
Mon Oct 3 21:44:14 UTC 2022


On Fri, 30 Sep 2022 16:21:32 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Will definitely do!  Some tests were failing yesterday, until all is fixed - it's a draft PR :-)
>> Thank you so much, @kleopatra
>
>> Perhaps the test is too artificial, something is not being done correctly or exactly as in the real application? Using StageLoader or showControl() hooks up the missing dependencies.
> 
> one last time: there is _no_ such thing as a "too artificial" test - a class must _always_ fulfil its contract in whatever valid context. It's not enough to do so for some (or even the majority) of use-cases. Plus: logically, any assumption (like: there are no memory leaks) is invalidated by a single counter-example (like the valid test).
> 
> Have a nice weekend, I'm off now :)

... as long as the context is *valid" :-)

thanks again, have a great weekend!

You are right, @kleopatra  - this executeOnceWhenPropertyIsNonNull() is installing a listener.
perhaps we should add a similar functionality to LambdaMultiplePropertyChangeListenerHandler and actually install a WeakListener instead.

Thanks again, @kleopatra 
With your permission, I'll add tests with and without scene property set.  Or do we want to keep the original set?

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

PR: https://git.openjdk.org/jfx/pull/906


More information about the openjfx-dev mailing list