deletes this Lock object. assumes that it has no children and no owners
(does not check this itself)
179219
public void removeLockedObject() {
        if (this != _resourceLocks._root && !this.getPath().equals("/")) {

            int size = _parent._children.length;
            for (int i = 0; i < size; i++) {
                if (_parent._children[i].equals(this)) {
                    LockedObject[] newChildren = new LockedObject[size - 1];
                    for (int i2 = 0; i2 < (size - 1); i2++) {
                        if (i2 < i) {
                            newChildren[i2] = _parent._children[i2];
                        } else {
                            newChildren[i2] = _parent._children[i2 + 1];
                        }
                    }
                    if (newChildren.length != 0) {
                        _parent._children = newChildren;
                    } else {
                        _parent._children = null;
                    }
                    break;
                }
            }

            // removing from hashtable
            _resourceLocks._locksByID.remove(getID());
            _resourceLocks._locks.remove(getPath());

            // now the garbage collector has some work to do
        }
    }
227484
def remove(self, safe=None):
        
        self._session.remove(self, safe=None)
        self._session.flush()
1013675
public void removeChild(ElementBase child, boolean destroy) {
        if (!children.contains(child)) {
            return;
        }
        
        boolean isLocked = child.isLocked() || child.getDefinition().isInternal();
        
        if (destroy) {
            child.removeChildren();
            
            if (!isLocked) {
                child.destroy();
            }
        }
        
        if (!isLocked) {
            beforeRemoveChild(child);
            children.remove(child);
            child.updateParent(null);
            afterRemoveChild(child);
        }
    }
1223674
def remove_from_parent(self):
        '''
        
        '''
        if self.parent:
            self.parent._children.remove(self)
            self.parent._invalidate_time_caches()
            self.parent = None
1220498
def clear( self ):
        
        self.blockSignals(True)
        self.setUpdatesEnabled(False)
        for child in self.findChildren(XRolloutItem):
            child.setParent(None)
            child.deleteLater()
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
101797
def delete(self):
        
        if self._new:
            raise Exception("This is a new object, %s not in data, \
indicating this entry isn't stored." % self.primaryKey)

        r.table(self.table).get(self._data[self.primaryKey]) \
            .delete(durability=self.durability).run(self._conn)
        return True
1350197
def delete(self):
        

        if self.oracle:
            self.oracle.delete()
            self.oracle = None

        if self.tot:
            self.tot.delete()
            self.tot = None
1301386
def clear(self):
        
        self._delete_child_storage(self.root_node)
        self._delete_node_storage(self.root_node)
        self.root_node = BLANK_NODE
216882
def remove_child(child)
      child = child.name if child.is_a?(Model)
      children.delete(child)
    end
606549
void deleteWithChildren() {
    if (leaderboard != null) leaderboard.deleteWithChildren();

    if (gridKeys != null)
      for (Key<Grid> gridKey : gridKeys) gridKey.remove();

    // If the Frame was made here (e.g. buildspec contained a path, then it will be deleted
    if (buildSpec.input_spec.training_frame == null && origTrainingFrame != null) {
      origTrainingFrame.delete();
    }
    if (buildSpec.input_spec.validation_frame == null && validationFrame != null) {
      validationFrame.delete();
    }
    if (buildSpec.input_spec.leaderboard_frame == null && leaderboardFrame != null) {
      leaderboardFrame.delete();
    }
    delete();
  }
1022869
def remove(self):
        
        if self.parent is not None:
            for i, child in enumerate(self.parent.children):
                if id(child) == id(self):
                    self.parent.remove_child(i)
                    self.parent = None
                    break
577931
public void removeTempLockedObject() {
        if (this != resourceLocks.tempRoot) {
            // removing from tree
            if (parent != null && parent.children != null) {
                int size = parent.children.length;
                for (int i = 0; i < size; i++) {
                    if (parent.children[i].equals(this)) {
                        LockedObject[] newChildren = new LockedObject[size - 1];
                        for (int i2 = 0; i2 < (size - 1); i2++) {
                            if (i2 < i) {
                                newChildren[i2] = parent.children[i2];
                            } else {
                                newChildren[i2] = parent.children[i2 + 1];
                            }
                        }
                        if (newChildren.length != 0) {
                            parent.children = newChildren;
                        } else {
                            parent.children = null;
                        }
                        break;
                    }
                }

                // removing from hashtable
                resourceLocks.tempLocksByID.remove(getID());
                resourceLocks.tempLocks.remove(getPath());

                // now the garbage collector has some work to do
            }
        }
    }
508609
public function destroy()
	{
		if(!empty($this->children))
		{
			foreach($this->children as $child)
				$child->destroy();
		}
		unset($this->_finder, $this->_parent, $this->model, $this->relation, $this->master, $this->slave, $this->records, $this->children, $this->stats);
	}
409913
def do_lock
      clean
      if(@lock_owner)
        if(owner?(Thread.current))
          @locks.unshift(Thread.current)
        else
          @locks << Thread.current
        end
      else
        @lock_owner = Thread.current
      end
      true
    end
502000
private void removeUseless() {
    Set<Map.Entry<String, PropertyNode>> entries = _children.entrySet();
    for (Iterator<Map.Entry<String, PropertyNode>> it = entries.iterator(); it.hasNext(); ) {
      Map.Entry<String, PropertyNode> entry = it.next();
      PropertyNode child = entry.getValue();
      child.removeUseless();
      if (child.isUseless()) {
        it.remove();
      }
    }
  }
1366271
def delete(descendant)
      @descendants.delete(descendant)
      each { |d| d.descendants.delete(descendant) }
    end
802139
def remove_lock(self):
        
        key = '%s_lock' % self.scheduler_key

        if self._lock_acquired:
            self.connection.delete(key)