Detecting when a TreeItem is no more used

2013-07-26 Thread Fabrizio Giudici
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

Re: Detecting when a TreeItem is no more used

2013-07-26 Thread Fabrizio Giudici
On Fri, 26 Jul 2013 13:47:50 +0200, Tom Schindl tom.schi...@bestsolution.at wrote: Not sure but what is reused is the TreeCell, the TreeItem is not freed and has to exists as long as you show the tree! TreeItem... i1 = new TreeItem...(); treeView.setRoot(i1);

Re: Detecting when a TreeItem is no more used

2013-07-26 Thread Tom Schindl
Correct, but then i1 is not referenced anymore and so GC should free it, not? Tom On 26.07.13 21:45, Fabrizio Giudici wrote: On Fri, 26 Jul 2013 13:47:50 +0200, Tom Schindl tom.schi...@bestsolution.at wrote: Not sure but what is reused is the TreeCell, the TreeItem is not freed and has to