in Corona and Lua - why does my memory usage increase to 1.5MB then back down to 800Kb then repeats

jasonbb
jasonbb used Ask the Experts™
on
I am writing a game in Lua on the Corona platform. Currently it's pretty simple.
I am writing the memory usage to the screen every frame using gcinfo().
Why does my memory usage increase to 1.5MB then back down to 800Kb then repeats?
Is it normal?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Awarded 2017
Distinguished Expert 2018
Commented:
That sounds perfectly normal to me
jasonbbSoftware Engineer

Author

Commented:
Also, sometimes it can help if you call collectgarbage() occasionally.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial