with an unregister in onDetach still leave some sort of reference since MAT reveals that stuff keep gathering in the static list. How should this be avoided in the app? Having WeakReferences in the MessageBroadcaster-list? Calling the MessageDialog differently? Pointers appreciated…
Having WeakReferences in the MessageBroadcaster-list?
Yes, that is at least needed, I have one example here using WeakHashMap for the listeners. At least in that Vaadin 8 example the problem is obvious, as there is public class PushAroundUI extends UI implements Broadcaster.BroadcastListener and Broadcaster.register(this);, where this is of course UI implementing BroadcastListener, thus UI’s build up in the LinkedList.