RFR: 8307538: Memory leak in TreeTableView when calling refresh [v2]

Andy Goryachev angorya at openjdk.org
Thu May 11 22:31:19 UTC 2023


On Wed, 10 May 2023 16:14:43 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> The problem is, `dispose()` is never called for cells discarded by the refresh() method.
>> 
>> In the absence of explicit release, these cells are still listening - so using a weak listener in this case is, I think, the right approach.  Adding explicit release per your (absolutely valid) suggestion is a good idea, but much, much more complicated task.
>
> Even if you are using weak listeners, `dispose` should remove them.

revered back to using register*Listener, which creates a weak listener and also disconnects them in dispose()

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1129#discussion_r1191748091


More information about the openjfx-dev mailing list