On Mon, 11 Jul 2022 08:00:41 GMT, Florian Kirmaier <fkirma...@openjdk.org> wrote:
>> Making the initial listener of the ListProperty weak fixes the problem. >> The same is fixed for Set and Map. >> Due to a smart implementation, this is done without any performance drawback. >> (The trick is to have an object, which is both the WeakReference and the >> Changelistener) >> By implying the same trick to the InvalidationListener, this should even >> improve the performance of the collection properties. > > Florian Kirmaier has updated the pull request incrementally with one > additional commit since the last revision: > > JDK-8277848 > Added 3 more tests to verify that a bug discussed in the PR does not appear. **Discussed Property Leak** @mstr2 I've added your test to the PR and it's green. I think you mixed something up when testing this. I've added the same test for the other property types. **Lazyness** I don't know whether it's a good idea to add laziness to an existing API. But it's not the scope of my PR. I only try to fix a fundamental bug. Honestly, I'm not a big fan of laziness, because of the complexity, it tends to introduce. ------------- PR: https://git.openjdk.org/jfx/pull/689