Detecting when a TreeItem is no more used
Fabrizio Giudici
Fabrizio.Giudici at tidalwave.it
Fri Jul 26 23:38:42 PDT 2013
On Sat, 27 Jul 2013 05:35:37 +0200, Tom Schindl
<tom.schindl at bestsolution.at> wrote:
> Correct, but then i1 is not referenced anymore and so GC should free it,
> not?
As I said in my previous email, my TreeItem is bound to resources other
than memory and this kind resources must be released synchronously - the
GC would usually intervene too late. For instance, the TreeItem might
subscribe to events that are used to update its state, and unsubscription
must happen when the TreeItem is no more used, otherwise bad things can
happen.
--
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