vaadin4spring icon indicating copy to clipboard operation
vaadin4spring copied to clipboard

EventBusListenerMethod with subscribeWithWeakReference is not subscribed

Open Emmenemoi opened this issue 5 years ago • 0 comments

This cannot work in ScopedEventBus line 220: MethodListenerWrapper is locally defined, so it will be garbage collected asap -> listener ignored.

MethodListenerWrapper l = new MethodListenerWrapper(ScopedEventBus.this, listener, topic,
                                    includingPropagatingEvents, m);
if (weakReference) {
      listeners.addWithWeakReference(l);

Emmenemoi avatar Feb 12 '20 00:02 Emmenemoi