Page 1 of 1

Memory problem

Posted: Mon Apr 01, 2019 7:00 pm
by CreampieCody
this piece of code works fine elsewhere but in love's case windows task manager shows 800-900 MB still being used by love even after freeing all the memory. what gives?

Code: Select all

-- main.lua
t = {}
for i = 1, 10000000 do
    table.insert(t, {1,2,3})
end
t = nil
print(collectgarbage("count")) -- ~834440.80957031
collectgarbage()
print(collectgarbage("count")) -- ~243.7705078125
-- however task manager shows ~800MB

Re: Memory problem

Posted: Tue Apr 02, 2019 1:02 pm
by keharriso
My guess is that LÖVE is holding on to the memory in case you allocate some more later in the program. The memory is likely unused but remains allocated to the process. That's just a guess, though.