mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-12 19:31:47 +00:00
added manual gc early-outs if a collection finishes
This commit is contained in:
parent
310af508bd
commit
c573c79d32
@ -48,7 +48,9 @@ return function(time_budget, memory_ceiling, disable_otherwise)
|
||||
love.timer.getTime() - start_time < time_budget and
|
||||
steps < max_steps
|
||||
do
|
||||
collectgarbage("step", 1)
|
||||
if collectgarbage("step", 1) then
|
||||
break
|
||||
end
|
||||
steps = steps + 1
|
||||
end
|
||||
--safety net
|
||||
|
Loading…
Reference in New Issue
Block a user