How to use empty.exe?
Its application format is: empty.exe process PID or empty.exe process name
You can place empty.exe in the script directory or the system temporary folder, and add the following line of code every time the script transfers from the foreground to the background, or after completing a certain hotkey response:
RunWait, empty.exe AutoHotkey.exe,Hide
If the script is compiled into an exe file and then run, change it to the following line:
RunWait, empty.exe %A_ScriptName%,Hide
The role of empty.exe:
Its function is to call empty.exe to release its own free memory after AutoHotkey (or exe program) completes a certain task. This can greatly reduce the memory footprint of AutoHotkey (or the compiled .exe program). The following is a comparison of AutoHotkey memory usage before and after adding this line of code:
Before using empty.exe:
After using empty.exe:
From the above comparison, it can be seen that the memory occupied by AutoHotkey has been reduced from 4M to about 500k, and the virtual memory occupied is not increased (both 1460k before and after). It can be seen that empty.exe does not transfer memory to virtual memory like some memory organization software, but actually reduces the memory occupied by applications.
empty.exe What is it?
Microsoft Windows 2003 system comes with a memory organizer, which can release memory resources that the specified application fails to release in time during operation, instead of forcing the system to release all resources like those third-party software memory management software. It will not increase the burden on the hard disk. If you have a 2003 system, it is a false alarm.
it works
it works
it works