@Override public void destroy(){
  Thread thread=Thread.currentThread();
  ClassLoader oldLoader=thread.getContextClassLoader();
  try {
    thread.setContextClassLoader(this);
    WeakStopListener stopListener=_stopListener;
    _stopListener=null;
    super.destroy();
    thread.setContextClassLoader(oldLoader);
    ClassLoader parent=getParent();
    for (; parent != null; parent=parent.getParent()) {
      if (parent instanceof EnvironmentClassLoader) {
        EnvironmentClassLoader loader=(EnvironmentClassLoader)parent;
        loader.removeListener(stopListener);
      }
    }
  }
  finally {
    thread.setContextClassLoader(oldLoader);
    _attributes=null;
    _listeners=null;
  }
}

@ Override public void destroy ( ) { Thread thread = Thread . currentThread ( ) ; ClassLoader oldLoader = thread . getContextClassLoader ( ) ; try { thread . setContextClassLoader ( this ) ; WeakStopListener stopListener = _stopListener ; _stopListener = null ; super . destroy ( ) ; thread . setContextClassLoader ( oldLoader ) ; ClassLoader parent = getParent ( ) ; for ( ; parent != null ; parent = parent . getParent ( ) ) { if ( parent instanceof EnvironmentClassLoader ) { EnvironmentClassLoader loader = ( EnvironmentClassLoader ) parent ; loader . removeListener ( stopListener ) ; } } } finally { thread . setContextClassLoader ( oldLoader ) ; _attributes = null ; _listeners = null ; } }
destroys the class loader .
