Apply this method in WinXP, Win2k, which does not display the program that has been running for the main form. The previous program takes up 11M memory. I use the way to create a window can only be reduced less than 100K. After applying this method, the memory occupies only 496K. Put the following process in a Timer, execute once 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;