RFR: 8373908: XYChart (ScatteredChart) leaks memory when removing data [v2]
John Hendrikx
jhendrikx at openjdk.org
Fri Dec 19 11:32:37 UTC 2025
On Fri, 19 Dec 2025 08:54:35 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> I think a second reviewer couldn't hurt. I only have two questions:
>>
>> 1. I presume that moving the local listeners to be instance variables is needed? At first glance, I couldn't figure out why.
>> 2. Is a test feasible? If not, we should consider filing a follow-up.
>
>> I think a second reviewer couldn't hurt. I only have two questions:
>>
>> 1. I presume that moving the local listeners to be instance variables is needed? At first glance, I couldn't figure out why.
>> 2. Is a test feasible? If not, we should consider filing a follow-up.
>
> 1. It is not needed, but they also don't need to be recreated each time as they're constant
> 2. I think a test may be possible, we can check if the data objects get GC'd
>
> I'm neutral on the get property thing
> BTW, I want to start an informal knowledge base - your comments @hjohn are too good to just leave in the PRs :-) or JBS in tickets https://bugs.openjdk.org/browse/JDK-8373908?focusedId=14842224&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14842224
Yeah, I don't know where it could be stored, there are many insightful comments in the JBS by developers that have worked on FX over the years. Perhaps we could look if such things can just be added to the documentation in a logical spot, on a class or package.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/2013#issuecomment-3674709646
More information about the openjfx-dev
mailing list