code: public void classLoaderDestroy(DynamicClassLoader loader)
    {
      Method destroy = getDestroyMethod(_resource.getClass());
  
      if (destroy == null)
        return;
      
      try {
        destroy.invoke(_resource);
      } catch (Throwable e) {
        log.log(Level.WARNING, e.toString(), e);
      }
    }
docs: Handles the case where a class loader is dropped.