Get a list of all TreeCell objects that currently exist in a TreeView
问题 I know that TreeCell objects are generated dynamically by the TreeView using a cell factory. Is there a way to get a list of all TreeCell objects that currently exist? I suppose I could keep track of them by modifying the cell factory. As in, whenever I create a new cell add it to some list. But then I'm not sure how to remove cells from my list once the TreeView disposes them (because they went out of view). 回答1: My solution to this is to use weak references: [A] weak reference is a