Global UI access

Is there some way of checking globally how many UI:s are currently alive or is the information only stored in session scope? I could of course register them with weak references in some singleton. I have a feeling that they are not being released properly, do you have any suggestions where to add listeners etc that would show them being killed off? Just an UI detachedListener?

Yes, UI detachedListener should be the way to go. Of course, getting detached isn’t a guarantee that the UI object gets garbage collected - if you have strong references to the object elsewhere, it could still be left hanging.

But it’s not something you should have by accident, right? And in normal cases, nothing goes beyond session scope so when the session does, GC collects?

Yep, that’s right.