{
关键字=内存清理
采集软件=MKM - 我的知识管理
采集日期=2023-11-23 13:54:12
数字签名=BD8A8BB93D9C5E0631C0A1B0AC5A3175
}
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms,
Dialogs, StdCtrls;
//DELPHI清理释放内存小代码
procedure ClearMemory;
begin
{内存清理}
if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
SetProcessWorkingSetSize(GetCurrentProcess, $FFFFFFFF, $FFFFFFFF);
Application.ProcessMessages;
end;
end;