public boolean removeModule(ModuleHandle moduleHandle){
  boolean noLoadedModules=false;
  boolean wasModuleRemoved=false;
synchronized (privateInstanceLock) {
    if (modules.remove(moduleHandle)) {
      wasModuleRemoved=true;
      noLoadedModules=(modules.size() == 0);
    }
  }
  if (noLoadedModules) {
    setTerminated(true);
  }
  return wasModuleRemoved;
}

public boolean removeModule ( ModuleHandle moduleHandle ) { boolean noLoadedModules = false ; boolean wasModuleRemoved = false ; synchronized ( privateInstanceLock ) { if ( modules . remove ( moduleHandle ) ) { wasModuleRemoved = true ; noLoadedModules = ( modules . size ( ) == 0 ) ; } } if ( noLoadedModules ) { setTerminated ( true ) ; } return wasModuleRemoved ; }
removes a module that is no longer loaded in this browser tab . if , after the removal of the module from the list of loaded modules , this browser tab has no loaded modules , it will be marked as terminated , and an event will be reported to all listeners on the model . there should only be a single module loaded in this tab that matches the given module handle . note : this method fires events . if you ' re invoking this method from other model classes , make sure that no locks are being held .
