c#中DevExpress控件的gdi占用完全释放的代码
以下是一个示例代码,用于释放DevExpress控件的GDI资源:
private void releaseGDIResources(Control control) { if (control == null) return;
//释放控件的GDI资源
control.ReleaseGDISurface();
//递归释放子控件的GDI资源
foreach (Control childControl in control.Controls)
{
releaseGDIResources(childControl);
}
}
//调用 releaseGDIResources(myControl);
原文地址: https://www.cveoy.top/t/topic/dqGV 著作权归作者所有。请勿转载和采集!