Use 11M memory, down to 500K

xiaoxiao2021-03-06  58

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;

转载请注明原文地址:https://www.9cbs.com/read-86607.html

New Post(0)