内存释放

代码如下:

_ReduceMemory(@AutoItPID)
Func _ReduceMemory($i_PID = -1)
    If $i_PID <> -1 Then
        Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
        Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0])
        DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0])
    Else
        Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
    EndIf

    Return $ai_Return[0]
EndFunc   ;==>_ReduceMemory
申明:本站资源大部分来自网络,如果无意侵犯了你的权利,请及时通知我们 AutoIt@FoxMail.Com,我们将尽快处理
Copyright © 2008-2009 随便复制 共享精神 人人有责 All Right Reserved
粤ICP备08009024号