fix(winforms): release module grid resources
This commit is contained in:
@@ -154,7 +154,11 @@ namespace Lskj.PubModuleDetail
|
||||
{
|
||||
this.mControl.CloseModule();
|
||||
string guid = this.Tag + "";
|
||||
if (string.IsNullOrWhiteSpace(guid)) return;
|
||||
if (string.IsNullOrWhiteSpace(guid))
|
||||
{
|
||||
this.mControl.ReleaseResourcesForDispose();
|
||||
return;
|
||||
}
|
||||
DllModule m = Manager.ModuleForms[guid];
|
||||
m.IsClose = true;
|
||||
if (SystemInfo.Instance.EfficientVerification)
|
||||
@@ -175,6 +179,15 @@ namespace Lskj.PubModuleDetail
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FormClosing fires before the control tree is disposed. Release the
|
||||
// DevExpress grids and their native resources as soon as the close is
|
||||
// confirmed; waiting for FrmMain.Dispose leaves GDI handles alive
|
||||
// between module cycles.
|
||||
if (!e.Cancel)
|
||||
{
|
||||
this.mControl.ReleaseResourcesForDispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user