Hi everyone
I’m new to Corona, I starting making a game and it’s awesome so far!
I started to optimize it (find leaks, etc), but I came to an issue with the garbage collector: even with an empty scene, the total memory keeps increasing. I know you guys say that up to 8Kb is normal and expected behavior, but even with no objects at all?
Here is the full content of the test main.lua file:
function printGC(event) print("total mem used:" .. collectgarbage('count')) end Runtime:addEventListener('enterFrame', printGC)
This prints out increasing numbers: starts at 250 and when it get to ~420, then starts the GC and resets to ~250.
What does Corona do in the back that makes the GC keep increasing all the time? And can this be stopped/prevented? I know you could use
collectgarbage("stop")
but I’m asking to stop the reason why the memory used is increasing, not the actual process of freeing the memory.
You’re right, compared to 3MB it’s nothing,