Deletes a reference for a given node.
@param root the node
@throws IllegalArgumentException if the root node was invalid
483028
private void delRef(final int root) {
    if (root < 2)
      return;
    if (root >= this.nodesize)
      throw new IllegalStateException("Cannot dereference a variable > varnum");
    if (this.low(root) == -1)
      throw new IllegalStateException("Cannot dereference variable -1");
    if (!this.hasref(root))
      throw new IllegalStateException("Cannot dereference a variable which has no reference");
    this.decRef(root);
  }
193979
private void deleteEntry(TreeMapEntry<K,V> p) {
        modCount++;
        size--;

        // If strictly internal, copy successor's element to p and then make p
        // point to successor.
        if (p.left != null && p.right != null) {
            TreeMapEntry<K,V> s = successor(p);
            p.key = s.key;
            p.value = s.value;
            p = s;
        } // p has 2 children

        // Start fixup at replacement node, if it exists.
        TreeMapEntry<K,V> replacement = (p.left != null ? p.left : p.right);

        if (replacement != null) {
            // Link replacement to parent
            replacement.parent = p.parent;
            if (p.parent == null)
                root = replacement;
            else if (p == p.parent.left)
                p.parent.left  = replacement;
            else
                p.parent.right = replacement;

            // Null out links so they are OK to use by fixAfterDeletion.
            p.left = p.right = p.parent = null;

            // Fix replacement
            if (p.color == BLACK)
                fixAfterDeletion(replacement);
        } else if (p.parent == null) { // return if we are the only node.
            root = null;
        } else { //  No children. Use self as phantom replacement and unlink.
            if (p.color == BLACK)
                fixAfterDeletion(p);

            if (p.parent != null) {
                if (p == p.parent.left)
                    p.parent.left = null;
                else if (p == p.parent.right)
                    p.parent.right = null;
                p.parent = null;
            }
        }
    }
1014590
public static <T extends MutableTreeNode<T>> void removeChild(T parent, T child) {
        checkArgNotNull(parent, "parent");
        int index = parent.getChildren().indexOf(child);
        checkElementIndex(index, parent.getChildren().size());
        parent.removeChild(index);
    }
700949
public static base_response delete(nitro_service client, clusternode resource) throws Exception {
		clusternode deleteresource = new clusternode();
		deleteresource.nodeid = resource.nodeid;
		return deleteresource.delete_resource(client);
	}
227680
protected Set<ClusterNode.GrantId> deleteNode(ClusterNode node) {
    synchronized (node) {
      if (node.deleted) {
        return null;
      }

      node.deleted = true;
      // 1: primary
      nameToNode.remove(node.getName());
      faultManager.deleteNode(node.getName());
      nameToApps.remove(node.getName());
      hostsToSessions.remove(node);
      setAliveDeadMetrics();

      // 2: update runnable index
      for (RunnableIndices r : typeToIndices.values()) {
        r.deleteRunnable(node);
      }
      return node.getGrants();
    }
  }
241323
public static void deleteContentsInDirectoryTree(File root, String includeMask) {
		Collection<File> files = getContentsInDirectoryTree(root, includeMask, true, true);
		for(File file : files) {
			if (file.exists()) {//file may meanwhile have been deleted
				if (file.isDirectory()) {
					//empty directory
					emptyDirectory(file.getAbsolutePath());
				}
				file.delete();				
			}
		}
	}
324175
public void delete() {
    Buffer buffer = this.buffer instanceof SlicedBuffer ? ((SlicedBuffer) this.buffer).root() : this.buffer;
    if (buffer instanceof FileBuffer) {
      ((FileBuffer) buffer).delete();
    } else if (buffer instanceof MappedBuffer) {
      ((MappedBuffer) buffer).delete();
    }

    offsetIndex.delete();
  }
1246660
public static void prune(File file, File root) {
    while (!file.equals(root) && file.delete()) {
      file = file.getParentFile();
    }
  }
866020
protected void removeDependent(Node nodeToRemove) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "removeDependent entry: node to remove: " + nodeToRemove);
        }
        dependents.remove(nodeToRemove);
    }
99297
private static void delDefault(Tree<Node> tree){
		if(!tree.isLeaf()){
			for(int i=0;i<tree.children.size();i++){
				if(isDefault(tree.getChild(i))){
					tree.removeChild(i); 
				}
			}
			for(int i=0;i<tree.children.size();i++){
				delDefault(tree.getChild(i));
			}
		}	
	}
1244294
public void deleteSubtreeExcludingRoot(Dn root) throws NoSuchNodeException, MissingParentException {
        existsCheck(root);
        try {
            EntryCursor entryCursor = connection.search(root, "(objectclass=*)", SearchScope.ONELEVEL);
            while (entryCursor.next()) {
                deleteSubtreeIncludingRoot(entryCursor.get().getDn());
            }
        } catch (Exception e) {
            throw new LdapDaoException(e);
        }
    }
453331
@Override
  public final boolean delete(DBIDRef id) {
    // find the leaf node containing o
    O obj = relation.get(id);
    IndexTreePath<DeLiCluEntry> deletionPath = findPathToObject(getRootPath(), obj, id);
    if(deletionPath == null) {
      return false;
    }
    deletePath(deletionPath);
    return true;
  }
778413
def _delete_node_storage(self, node, is_root=False):
        
        if node == BLANK_NODE:
            return
        # assert isinstance(node, list)
        encoded = rlp_encode(node)
        if len(encoded) < 32 and not is_root:
            return
        """
        ===== FIXME ====
        in the current trie implementation two nodes can share identical subtrees
        thus we can not safely delete nodes for now
        """
        hashkey = utils.sha3(encoded)
        self.db.dec_refcount(hashkey)
955344
@Override
    public FileNode deleteTree() throws DeleteException, NodeNotFoundException {
        if (!exists()) {
            throw new NodeNotFoundException(this);
        }
        try {
            doDeleteTree(path);
        } catch (IOException e) {
            throw new DeleteException(this, e);
        }
        return this;
    }
1042655
@Override
	public void annotateRemove(String oid) throws IndexerException {
		log.debug("Deleting " + oid + " from Anotar index");
		try {
			anotar.deleteByQuery("rootUri:\"" + oid + "\"");
			anotar.commit();
		} catch (SolrServerException sse) {
			throw new IndexerException(sse);
		} catch (IOException ioe) {
			throw new IndexerException(ioe);
		}
	}
443703
public static void remove(Xml root, String formula)
    {
        Check.notNull(root);
        Check.notNull(formula);

        for (final Xml node : root.getChildren(NODE_FORMULA))
        {
            if (node.readString(ATT_NAME).equals(formula))
            {
                root.removeChild(node);
            }
        }
    }
167780
public function delete(&$node, JsonPointerInterface $pointer)
    {
        $pathElements = $pointer->toArray();
        if (!$pathElements) {
            throw new InvalidPathException('Cannot delete root document');
        }
        $lastPath = array_pop($pathElements);
        $lastNode = & $this->getNodeReference($node, $pathElements);

        $accessor = $this->getAccessorForNode($lastNode, $pointer, $lastPath);
        $isAssocArray = $this->isAssociativeArray($lastNode);
        $accessor->delete($lastNode, $lastPath);

        if (!$isAssocArray) {
            $lastNode = array_values($lastNode);
        }
    }