From 36c8449e4d8d5b2e8a72b51ba1d29bbc96e7b080 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 23 Nov 2021 00:28:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AD=98=E8=BF=87=E4=BD=8E=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=AF=8F=E6=AC=A1=E5=90=AF=E5=8A=A8=E6=9C=80?= =?UTF-8?q?=E5=A4=9A=E5=87=BA=E7=8E=B0=E4=B8=89=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 30f09f2a..f52e605f 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -388,11 +388,11 @@ end function love.directorydropped(dir) if SCN.directoryDropped then SCN.directoryDropped(dir)end end -local lastGCtime=0 +local autoGCcount=0 function love.lowmemory() - if love.timer.getTime()-lastGCtime>6.26 then - collectgarbage() - lastGCtime=love.timer.getTime() + collectgarbage() + if autoGCcount<3 then + autoGCcount=autoGCcount+1 MES.new('check',"[auto GC] low MEM 设备内存过低") end end