内存过低的提示每次启动最多出现三次
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user