code: public void addReferenceListener(ReferenceListener listener) {
  		if (this.listeners == null) {
  			this.listeners = new LinkedList<>();
  		}
  		final List<ReferenceListener> list = this.listeners;
  		synchronized (list) {
  			list.add(listener);
  		}
  	}
docs: Add listener on reference's release.
  
  @param listener the listener.