system/src/sc/layer/LayeredSystem.java
public void dispose(Object obj) {
      if (options.liveDynamicTypes) {
         if (ModelUtil.getLiveDynamicTypes(this)) {
            Object type = DynUtil.getType(obj);
            if (type != null) {
               String typeName = ModelUtil.getTypeName(type);
               removeDynInstance(typeName, obj);
            }
         }
      }
      innerToOuterIndex.remove(obj);
      objectNameIndex.remove(obj);
      if (obj instanceof IDynObject) {
         IDynObject dynObj = (IDynObject) obj;
         Object type = dynObj.getDynType();
         if (type instanceof BodyTypeDeclaration) {
            ((BodyTypeDeclaration) type).stopDynComponent(dynObj);
         }
         else {
            if (obj instanceof IStoppable)
               ((IStoppable) obj).stop();
            if (obj instanceof IAltComponent)
               ((IAltComponent) obj)._stop();
         }
      }
      else {
         if (obj instanceof IStoppable)
            ((IStoppable) obj).stop();
         if (obj instanceof IAltComponent)
            ((IAltComponent) obj)._stop();
      }

   }
/**
    * Called to remove the object from the dynamic type system.  Though we use weak storage for these instances,
    * it's faster to get rid of them when you are done.  Use DynUtil.dispose to also remove the bindings.
    */
Called to remove the object from the dynamic type system.  Though we use weak storage for these instances,
it's faster to get rid of them when you are done.  Use DynUtil.dispose to also remove the bindings.
Called to remove the object from the dynamic type system . Though we use weak storage for these instances it ' s faster to get rid of them when you are done . Use DynUtil . dispose to also remove the bindings .
public void dispose(Object obj) {
      if (options.liveDynamicTypes) {
         if (ModelUtil.getLiveDynamicTypes(this)) {
            Object type = DynUtil.getType(obj);
            if (type != null) {
               String typeName = ModelUtil.getTypeName(type);
               removeDynInstance(typeName, obj);
            }
         }
      }
      innerToOuterIndex.remove(obj);
      objectNameIndex.remove(obj);
      if (obj instanceof IDynObject) {
         IDynObject dynObj = (IDynObject) obj;
         Object type = dynObj.getDynType();
         if (type instanceof BodyTypeDeclaration) {
            ((BodyTypeDeclaration) type).stopDynComponent(dynObj);
         }
         else {
            if (obj instanceof IStoppable)
               ((IStoppable) obj).stop();
            if (obj instanceof IAltComponent)
               ((IAltComponent) obj)._stop();
         }
      }
      else {
         if (obj instanceof IStoppable)
            ((IStoppable) obj).stop();
         if (obj instanceof IAltComponent)
            ((IAltComponent) obj)._stop();
      }
   }
public void dispose ( Object obj ) { if ( options . liveDynamicTypes ) { if ( ModelUtil . getLiveDynamicTypes ( this ) ) { Object type = DynUtil . getType ( obj ) ; if ( type != null ) { String typeName = ModelUtil . getTypeName ( type ) ; removeDynInstance ( typeName , obj ) ; } } } innerToOuterIndex . remove ( obj ) ; objectNameIndex . remove ( obj ) ; if ( obj instanceof IDynObject ) { IDynObject dynObj = ( IDynObject ) obj ; Object type = dynObj . getDynType ( ) ; if ( type instanceof BodyTypeDeclaration ) { ( ( BodyTypeDeclaration ) type ) . stopDynComponent ( dynObj ) ; } else { if ( obj instanceof IStoppable ) ( ( IStoppable ) obj ) . stop ( ) ; if ( obj instanceof IAltComponent ) ( ( IAltComponent ) obj ) . _stop ( ) ; } } else { if ( obj instanceof IStoppable ) ( ( IStoppable ) obj ) . stop ( ) ; if ( obj instanceof IAltComponent ) ( ( IAltComponent ) obj ) . _stop ( ) ; } }
Called to remove the object from the dynamic type system.
Called to remove the object from the dynamic type system .