public Tree RemoveNode(Tree a_tree) { if (this == a_tree) { return(Remove()); } int cmp = Compare(a_tree); if (cmp >= 0) { if (_preceding != null) { _preceding = _preceding.RemoveNode(a_tree); } } if (cmp <= 0) { if (_subsequent != null) { _subsequent = _subsequent.RemoveNode(a_tree); } } CalculateSize(); return(this); }
public virtual Tree Free(LocalObjectContainer file, Tree treeRoot, Slot slot) { file.Free(_slot.Address(), _slot.Length()); if (RemoveReferenceIsLast()) { if (treeRoot != null) { return treeRoot.RemoveNode(this); } } PointTo(slot); return treeRoot; }