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 exists as long as you show the tree!
> 
>     TreeItem<...> i1 = new TreeItem<...>();
>         treeView.setRoot(i1);
> 
>     TreeItem<...> i2 = new TreeItem<...>();
>         treeView.setRoot(i2);
> 
> I'd say that when you change the root to i2, i1 is no more needed, right?
> 
> 

Reply via email to