code: public void addWithWeakReference(Listener listener) {
          logger.trace("Adding listener [{}] using a weak reference", listener);
          synchronized (weakListeners) {
              weakListeners.add(listener);
          }
      }
docs: Adds the specified {@link org.vaadin.spring.events.internal.ListenerCollection.Listener} to the listener
  collection,
  using a weak reference. This means the listener does not need to be removed to be eligible for garbage
  collection.
  
  @param listener the listener to add, never {@code null}.