新手求教:应用运行过程中会产生一系列内存,导致运行变卡,有没有清理内存的方法可以直接调用呢?
@echo off
echo Boss 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%*.tmp
del /f /s /q %systemdrive%*._mp
del /f /s /q %systemdrive%*.log
del /f /s /q %systemdrive%*.gid
del /f /s /q %systemdrive%*.chk
del /f /s /q %systemdrive%*.old
del /f /s /q %systemdrive%\recycled*.*
del /f /s /q %windir%*.bak
del /f /s /q %windir%\prefetch*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies*.*
del /f /q %userprofile%\recent*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files*.*"
del /f /s /q "%userprofile%\Local Settings\Temp*.*"
del /f /s /q "%userprofile%\recent*.*"
echo 清除系统缓存完成!
echo. & pause
把上面的代码放到文档里。类型改成bat
android: 列出所有运行的进程,查看其重要值(RunningAppProcessInfo.importance,值越大说明进程重要程度越低),可以设定一个阈值,
如果该进程的重要值大于该阈值,就可以杀掉该进程。