public void Dispose() { if (Segments != null) { foreach (var bspSegment in Segments) { bspSegment.Dispose(); } if (LeftChild != null) { LeftChild.Dispose(); } if (RightChild != null) { RightChild.Dispose(); } } }