Remove garbage collection.
This commit is contained in:
parent
aefc390cc9
commit
92bb8a6c8e
1 changed files with 1 additions and 10 deletions
11
mapgen.lua
11
mapgen.lua
|
@ -485,18 +485,9 @@ end
|
|||
|
||||
|
||||
local function pgenerate(...)
|
||||
if math.floor(collectgarbage("count")/1024) > 400 then
|
||||
print("Fun Caves: Manually collecting garbage...")
|
||||
collectgarbage("collect")
|
||||
|
||||
-- Slow down to allow time to free memory.
|
||||
local clock = os.clock
|
||||
local t0 = clock()
|
||||
while clock() - t0 <= 2 do end
|
||||
end
|
||||
|
||||
local status, err = pcall(generate, ...)
|
||||
if not status then
|
||||
print('Fun Caves: Could not generate terrain:')
|
||||
print(dump(err))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue