|
Dylan Cuthbert wrote:
Right now, If I have 400 aliens each doing pos = pos + vec1 + vec2 + vec3, I get a leak of 400x3x16=20K each frame.. at 60fps that's 115k a second...6.9 meg a minute...4 gigabytes an hour... and that's without any lua table structures or malloc overheads in my calculation.
While waiting for the incremental GC, I manually activate a GC cycle on each frame. This is not the overall most economical strategy, but it gives me god realtime behaviour. Also I do avoid creating tables (avoid, but not completly disallow) during normal operation, I have been able to keep my garbage generation relatively modest so far. Eero