removals.addElement(key); place( (Reference) key, value, resState);
if (place( (Reference) key, value, resState)) { removals.addElement(key); }
   public void doPlaceResolve(ResolutionState resState) throws SmartFrogCompileResolutionException {      // Hold removals. NOT creating the vector here saves memory at the      // expense of two null checks below.      Vector removals = null;      // Resolve attributes      for (Enumeration e = context.keys(); e.hasMoreElements(); ) {         Object key = e.nextElement();         Object value = context.get(key);         try {           // Get attribute and if key a reference try to place it in the           // right component. Don't resolve value since it ain't mine           if (key instanceof Reference) {             // allocate removals if not already there             if (removals == null) {               removals = new Vector(5);             }             removals.addElement(key);             place( (Reference) key, value, resState);           } else if (value instanceof ComponentResolver) {             // Attribute value is resolvable, ask it to resolve itself             ( (ComponentResolver) value).doPlaceResolve(resState);           }         } catch (Throwable thr){           StringBuffer msg = new StringBuffer("Failed to resolve '");           msg.append(key.toString());           msg.append(" ");           msg.append(value.toString());           msg.append(";'");           if (thr instanceof java.lang.StackOverflowError) {             msg.append(". Possible cause: cyclic reference.");           }           throw new SmartFrogCompileResolutionException(msg.toString(), thr,               getCompleteName(), null, resState.unresolved());         }      }      if (removals != null) {         for (Enumeration e = removals.elements(); e.hasMoreElements(); ) {            context.remove(e.nextElement());         }      }   }