Detecting when a TreeItem is no more used
Fabrizio Giudici
Fabrizio.Giudici at tidalwave.it
Fri Jul 26 04:37:56 PDT 2013
Hello.
I have a library which creates a hierarchy of TreeItems out of a data
model, and of course the root TreeItem is later attached to a TreeView. I
need to know when those TreeItems are no more used, so I can free some
resources in the data model. I supposed that TreeItem had a life-cycle
method or an event that notifies its destruction, but I seem unable to
find it. At the moment it sounds as the solution is rather to watch for
the TreeView and detect when it is destroyed, or its root property is
changed, and then decide that the previously attached TreeView is no more
used. It would be fine for me, but I'm just trying to understand whether
this is the simpler, most appropriate approach.
Thanks.
--
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
http://tidalwave.it/fabrizio/blog - fabrizio.giudici at tidalwave.it
More information about the openjfx-dev
mailing list