mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 06:04:35 +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
|
love.timer.getTime() - start_time < time_budget and
|
||||||
steps < max_steps
|
steps < max_steps
|
||||||
do
|
do
|
||||||
collectgarbage("step", 1)
|
if collectgarbage("step", 1) then
|
||||||
|
break
|
||||||
|
end
|
||||||
steps = steps + 1
|
steps = steps + 1
|
||||||
end
|
end
|
||||||
--safety net
|
--safety net
|
||||||
|
Loading…
Reference in New Issue
Block a user