On Sat, 16 Nov 2024 00:58:47 GMT, Marius Hanl <mh...@openjdk.org> wrote:
> There are multiple issues in the `TableMenu` logic that result in a memory > leak. > > The following problems are now fixed with this PR: > - The listener, that is registered to the `col.visibleProperty()` was not > weak nor was it ever unregistered > - The fix is to do pretty much the same that was already done with the > `col.textProperty()` listener > - The `col.visibleProperty()` and `col.textProperty()` where added again and > again and again to the column when the columns changed (which happens when > toggling the visibility). > - The fix is to add the listeners once - when the `MenuItem` is created. > This way, when the `TableMenu` is rebuild and the cached `MenuItem` is used, > the whole listener logic is not run again for the column This pull request has now been integrated. Changeset: f0958683 Author: Marius Hanl <mh...@openjdk.org> URL: https://git.openjdk.org/jfx/commit/f0958683f63d6659fac94eee8ddc2d21519d53ff Stats: 285 lines in 3 files changed: 267 ins; 14 del; 4 mod 8341687: Memory leak in TableView after interacting with TableMenuButton Reviewed-by: angorya ------------- PR: https://git.openjdk.org/jfx/pull/1640