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.giud...@tidalwave.it

Reply via email to