Memory problem

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
CreampieCody
Prole
Posts: 1
Joined: Mon Apr 01, 2019 6:37 pm

Memory problem

Post 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
User avatar
keharriso
Party member
Posts: 109
Joined: Fri Nov 16, 2012 9:34 pm

Re: Memory problem

Post 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.
LÖVE-Nuklear - a lightweight immediate mode GUI for LÖVE games
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests