Hi, I am developing a game with some moderate physics that consists of roughly 5 - 25 balls bouncing around on the screen. One thing that worries me slightly is lua memory usage. I have a function that prints memory usage roughly once a second and I see my lua memory increasing at about 0.15kb/second. It increases for a while(I'm not going to wait till 600 kb because that would take LOTS of time). However I am reassured by the fact that lua memory usage stays between 313 to 316 kb if I call collect garbage once a second. This means that I don't have any real leaks right since objects do get freed and collected right? If so, I plan on using
collectgarbage("setstepmul", 150) |
to collect garbage once it reaches 150% of its initial value. Is this fine?