/// <summary> /// Disposes all the resources used by the <see cref="Syncfusion.UI.Xaml.TreeGrid.TreeNodesEnumerator"/> class. /// </summary> /// <param name="isDisposing">Indicates whether the call is from Dispose method or from a finalizer.</param> protected virtual void Dispose(bool isDisposing) { if (isDisposing) { Helper.Dispose(); Helper = null; this.current = null; this.RootNodes = null; } }
/// <summary> /// Disposes all the resources used by the <see cref="Syncfusion.UI.Xaml.TreeGrid.TreeNodeCollection"/> class. /// </summary> /// <param name="isDisposing">Indicates whether the call is from Dispose method or from a finalizer.</param> protected virtual void Dispose(bool isDisposing) { this.currentnode = null; if (this.helper != null) { this.helper.Dispose(); this.helper = null; } if (this.RootNodes != null) { foreach (var node in this.RootNodes) { node.Dispose(); } this.RootNodes.Clear(); this.RootNodes = null; } }
public TreeNodeCollection() { RootNodes = new TreeNodes(); helper = new TreeNodesTraversalHelper(this.RootNodes); }