Removes the object from the aggregation of the given control
Adds insertAggregation as the undo operation
The aggregationElements can be an array or a single object (e.g. ToolTip)
@override
194461
function (oParent, sName, oObject) {
			var iOldIndex;
			var oAggregationElements;
			if (oParent && oObject){
				oAggregationElements = JsControlTreeModifier.getAggregation.call(this, oParent, sName);
				if (oAggregationElements){
					oAggregationElements.some(function(oElement, iIndex) {
						if (oElement === oObject){
							iOldIndex = iIndex;
							return true;
						}
					});
				}
			}

			JsControlTreeModifier.removeAggregation.apply(this, arguments);

			if (iOldIndex || iOldIndex === 0) {
				this._saveUndoOperation("insertAggregation", [oParent, sName, oObject, iOldIndex]);
			}
		}
197032
function() {
    var elTable = this._elHdTable;
    if(elTable) {
        Ev.purgeElement(elTable, true);
        elTable.parentNode.removeChild(elTable);
        
        // A little out of place, but where else can we null out these extra elements?
        ///this._elBdColgroup = null;
        this._elBdThead = null;
    }
}
929516
function(event, model, collection, options) {
      if ((event === 'add' || event === 'remove') && collection !== this) return;
      if (event === 'destroy') this.remove(model, options);
      if (event === 'change') {
        var prevId = this.modelId(model.previousAttributes());
        var id = this.modelId(model.attributes);
        if (prevId !== id) {
          if (prevId != null) delete this._byId[prevId];
          if (id != null) this._byId[id] = model;
        }
      }
      this.trigger.apply(this, arguments);
    }
615888
function(oDD, sGroup) {
            if (!this.ids[sGroup]) {
                this.ids[sGroup] = {};
            }

            var obj = this.ids[sGroup];
            if (obj && obj[oDD.id]) {
                delete obj[oDD.id];
            }
        }
553489
function(event, model, collection, options) {
      if ((event == 'add' || event == 'remove') && collection != this) return;
      if (event == 'destroy') {
        this.remove(model, options);
      }
      if (model && event === 'change:' + model.idAttribute) {
        delete this._byId[model.previous(model.idAttribute)];
        this._byId[model.id] = model;
      }
      this.trigger.apply(this, arguments);
    }
944890
function(element, selector, event, callback, capturePhase) {

    unbind($(element).array[0], event, callback, capturePhase)
  }
469312
function() {
        //remove all event handlers, delete from entities
        this.each(function() {
            var comp;
            this.trigger("Remove");
            for (var compName in this.__c) {
                comp = components[compName];
                if (comp && "remove" in comp) comp.remove.call(this, true);

                // update map from component to (entityId -> entity)
                delete compEntities[compName][this[0]];
            }
            this._unbindAll();
            delete entities[this[0]];
        });
    }
1250463
@Override
  public void aggregate()
  {
    final Object value = selector.getObject();
    if (value == null) {
      return;
    }
    synchronized (this) {
      updateSketch(sketch, value);
    }
  }
507375
@Override
   public boolean remove(Object element)
   {
      for (int index = size - 1; index >= 0; index--) {
         if (element == elementData[index]) {
            final int numMoved = size - index - 1;
            if (numMoved > 0) {
               System.arraycopy(elementData, index + 1, elementData, index, numMoved);
            }
            elementData[--size] = null;
            return true;
         }
      }

      return false;
   }
771998
public VoidAggregation unpin(@NonNull VoidAggregation aggregation) {
        return unpin(aggregation.getOriginatorId(), aggregation.getTaskId());
    }
757755
function(ev, items, index, duringTeardown, fullTeardown) {
                        // If this is because an element was removed, we should
                        // check to make sure the live elements are still in the page.
                        // If we did this during a teardown, it would cause an infinite loop.
                        if (!duringTeardown && data.teardownCheck(text.parentNode)) {
                            return;
                        }
                        var removedMappings = masterNodeList.splice(index + 1, items.length),
                            itemsToRemove = [];
                        can.each(removedMappings, function(nodeList) {

                            // Unregister to free up event bindings.
                            var nodesToRemove = nodeLists.unregister(nodeList);

                            // add items that we will remove all at once
                            [].push.apply(itemsToRemove, nodesToRemove);
                        });
                        // update indices after remove point
                        indexMap.splice(index, items.length);
                        for (var i = index, len = indexMap.length; i < len; i++) {
                            indexMap[i](i);
                        }
                        // don't remove elements during teardown.  Something else will probably be doing that.
                        if (!fullTeardown) {
                            can.remove(can.$(itemsToRemove));
                        }

                    }
829743
@Override
    public E remove(int index) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Object[] elements = getArray();
            int len = elements.length;
            E oldValue = get(elements, index);
            int numMoved = len - index - 1;
            if (numMoved == 0)
                setArray(Arrays.copyOf(elements, len - 1));
            else {
                Object[] newElements = new Object[len - 1];
                System.arraycopy(elements, 0, newElements, 0, index);
                System.arraycopy(elements, index + 1, newElements, index,
                                 numMoved);
                setArray(newElements);
            }
            return oldValue;
        } finally {
            lock.unlock();
        }
    }
410957
@Override
  public void aggregate()
  {
    final ArrayOfDoublesSketch update = selector.getObject();
    if (update == null) {
      return;
    }
    synchronized (this) {
      union.update(update);
    }
  }
24027
public void setAggregationEnabled(boolean enabled) {
        if (enabled) {
            this.resourcesElementsProvider.setDefaultIncludedType(Included.AGGREGATED);
        } else {
            this.resourcesElementsProvider.setDefaultIncludedType(Included.PLAIN);
        }
    }
871683
function removeDuplicates(collection) {
  return collection.filter(function(e, i, arr) {
    return isValue(e) && arr.lastIndexOf(e) === i;
  });
}
1177763
function(ev, model, collection, options) {
      if ((ev === 'add' || ev === 'remove') && collection !== this) {
        return;
      }
      if (ev === 'destroy') {
        this.remove(model, options);
      }
      if (model && ev === 'change:objectId') {
        delete this._byId[model.previous("objectId")];
        this._byId[model.id] = model;
      }
      this.trigger.apply(this, arguments);
    }
857471
public void removeElement(
        org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel dragElement,
        ElementRemoveMode removeMode) {

        if (isGroupcontainerEditing()) {
            dragElement.removeFromParent();
            if (!getGroupcontainer().iterator().hasNext()) {
                // group-container is empty, mark it
                getGroupcontainer().addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().emptyGroupContainer());
            }
            getGroupcontainer().refreshHighlighting();
        } else {
            final String id = dragElement.getId();
            if (id != null) {
                addToRecentList(id, null);
            }

            I_CmsDropContainer container = dragElement.getParentTarget();
            switch (removeMode) {
                case saveAndCheckReferences:
                    dragElement.removeFromParent();
                    if (container instanceof CmsContainerPageContainer) {
                        ((CmsContainerPageContainer)container).checkEmptyContainers();
                    }
                    cleanUpContainers();
                    Runnable checkReferencesAction = new Runnable() {

                        public void run() {

                            checkReferencesToRemovedElement(id);
                        }
                    };
                    setPageChanged(checkReferencesAction);
                    break;
                case confirmRemove:
                    handleConfirmRemove(dragElement);
                    break;
                case silent:
                default:
                    dragElement.removeFromParent();
                    if (container instanceof CmsContainerPageContainer) {
                        ((CmsContainerPageContainer)container).checkEmptyContainers();
                    }
                    cleanUpContainers();
                    setPageChanged();
                    break;
            }
        }
    }