private void CleanUp() { for (int i = 0; i <= this.List.Count - 1; i++) { if (i > this.List.Count - 1) { CleanUp(); return; } if ((this.List[i] as BaseWindow).IsDisposed) { this.List.RemoveAt(i); CleanUp(); return; } } }