code: public static synchronized void deregisterStack(Stack stack) throws InternalException {
      // Gets the classloader of the code that called this method, may be null.
      ClassLoader callerCL = ClassLoader.getSystemClassLoader();
      println(new StringBuilder().append("StackManager.deregisterStack: ").append(stack).toString());
      // Walk through the loaded stacks.
      int i;
      StackInfo stackInfo = null;
      for (i = 0; i < stacks.size(); i++) {
        stackInfo = stacks.get(i);
        if (stackInfo.stack == stack) {
          break;
        }
      }
      // If we can't find the stack just return.
      if (i >= stacks.size()) {
        println("    couldn't find stack to unload");
        return;
      }
      // If the caller does not have permission to load the stack then throw a security exception.
      if (stackInfo == null || getCallerClass(callerCL, stackInfo.stackClassName) != stackInfo.stackClass) {
        throw new SecurityException();
      }
      // Remove the stack.  Other entries in stacks get shuffled down.
      stacks.remove(i);
    }
docs: Drops a driver from the <code>DiameterManager</code>'s list.  Applets can only
  deregister stacks from their own classloaders.
  
  @param stack the Diameter stack to drop
  @exception InternalException if a manager has internal error