DevApp/Gs.DevApp/DevFrm/FrmMain.cs
@@ -298,13 +298,25 @@ return; } foreach (XtraTabPage item in tabControl.TabPages) { if (item.Name == name) { //后来加上,为了释放窗体资源beg //foreach (Control control in item.Controls) //{ // if (control is Form) // { // Form myForm = control as Form; // myForm.Invoke((MethodInvoker)delegate { myForm.Dispose(); }); // 确保 UI 线程安全地释放资源 // } //} //后来加上,为了释放窗体资源end tabControl.TabPages.Remove(item); item.Dispose(); TabPageDic.Remove(name); return; } } } /// <summary>