Use 11M memory, down to 500K

xiaoxiao2021-03-06  42

Recently solved a problem - reducing memory usage. However, there is conditional, only this method can be applied in WinXP, Win2k, and does not show the best program that has been running. 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;

Transfer from: http://www.cnblogs.com/liubiqu/articles/88709.html

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

New Post(0)