code: public static void removeEnvironmentListener(EnvLoaderListener listener,
                                              ClassLoader loader)
    {
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader) {
          ((EnvironmentClassLoader) loader).removeListener(listener);
          return;
        }
      }
  
      _globalEnvironmentListeners.remove(listener);
    }
docs: Remove listener.
  
  @param listener object to listen for environment create/destroy
  @param loader the context class loader