LongKeyNode removeLeaf() throws IOException {

		long key = getKey(0);
		int prevBufferId = buffer.getInt(PREV_LEAF_ID_OFFSET);
		int nextBufferId = buffer.getInt(NEXT_LEAF_ID_OFFSET);
		if (prevBufferId >= 0) {
			LongKeyRecordNode prevNode = (LongKeyRecordNode) nodeMgr.getLongKeyNode(prevBufferId);
			prevNode.getBuffer().putInt(NEXT_LEAF_ID_OFFSET, nextBufferId);
		}
		if (nextBufferId >= 0) {
			LongKeyRecordNode nextNode = (LongKeyRecordNode) nodeMgr.getLongKeyNode(nextBufferId);
			nextNode.getBuffer().putInt(PREV_LEAF_ID_OFFSET, prevBufferId);
		}

		nodeMgr.deleteNode(this);
		if (parent == null) {
			return null;
		}
		return parent.deleteChild(key);
	}
Remove this leaf from the tree.
@return root node which may have changed.
@throws IOException thrown if IO error occurs
Ghidra/Framework/DB/src/main/java/db/LongKeyRecordNode.java