code: public void removeListener(EnvLoaderListener listener)
    {
      super.removeListener(listener);
      
      ArrayList<EnvLoaderListener> listeners = _listeners;
      
      if (_listeners == null)
        return;
  
      synchronized (listeners) {
        for (int i = listeners.size() - 1; i >= 0; i--) {
          EnvLoaderListener oldListener = listeners.get(i);
  
          if (listener == oldListener) {
            listeners.remove(i);
            return;
          }
          else if (oldListener == null) {
            listeners.remove(i);
          }
        }
      }
    }
docs: Adds a listener to detect environment lifecycle changes.