Take out the application 11M memory, drop to 500K (reproduced)

xiaoxiao2021-03-06  44

I haven't written blog for many days, and I have solved a problem - reducing memory occupation. 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;

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

New Post(0)