The following procedure is placed in a Timer, executed every time, such as 5 seconds.
{
*******************************************
* CLEAR MEMORY
* From muse2008
*******************************************
}
PROCEDURE CLEARMEMORY;
Begin
IF Win32Platform = VER_PLATFORM_WIN32_NT THEN
Begin
SetProcessWorkingsetSize (GetCurrentProcess, $ ffffff, $ ffffff);
Application.ProcessMESSAGES;
END;
END;
Do the memory occupied by the process is exchanged.
Memory is saved, but it will be loaded frequently.
May affect program operation efficiency