code: public void removeListener(LifecycleListener listener)
    {
      synchronized (this) {
        if (_listeners == null)
          return;
  
        for (int i = _listeners.size() - 1; i >= 0; i--) {
          LifecycleListener oldListener = _listeners.get(i).get();
  
          if (listener == oldListener) {
            _listeners.remove(i);
  
            return;
          }
          else if (oldListener == null)
            _listeners.remove(i);
        }
      }
    }
docs: Removes a listener.