[Rev 01] RFR: 8236259: MemoryLeak in ProgressIndicator

Florian Kirmaier fkirmaier at openjdk.java.net
Thu Dec 19 14:20:13 UTC 2019


On Thu, 19 Dec 2019 14:01:08 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Yes, that doesn't make a lot of sense. It's probably an artifact because I expected a different API do unregister the listener. I'm gonna change it back!
> 
> just thinking aloud: actually, it's rather whacky that the indicator (mis-)uses the skin's multiplePropertyListener - it's api isn't meant for frequent register/unregisters (the unregisters is quite a heavy measure). Maybe it should have its own? Or the other way round: skin listening to the property and indicator having a method to update based on font which is invoked by skin's listener?

Yes, that would be reasonable.

I would rewrite the fix, add an method "updateFont" to the skin, which also updates the DeterminationIndicator.

When I look into the code, I'm a little bit confused. The fontListeners doesn't get called without a font-change. In this case, the variable doneTextWidth and doneTextHeight never get's initialized. Do I miss something or is the current code wrong?

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

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


More information about the openjfx-dev mailing list