Hey guys I just purchased Corona Profiler and it is an INCREDIBLE tool. I can not stress how useful it is. In fact it lead me to creating this post.
So basically in my game I have some variables that are local to enterScene(declared as locals within enterScene) => therefor I cannot nil them in exitScene or destroyScene, correct?
My solution: made my own function called “nilVariablesFunc” which is declared outside of listener functions and the variables within enterScene are within its scope. Withing that function I nil the variables and call the function on any scene change(Menu or restart).
While going back to the menu after pausing the game, Corona Profiler as promised shows everything that is going on in the report. I noticed that when nilling the variables with my custom function the lua memory rises by 20 kb! Shouldn’t it be going down instead!
I made sure that the variables are in fact in-scope by doing a simple “print(variable)” test.
Calling collectgarbage(“collect”) at the end fo the function does nothing.
However after returning to the scene each time the startup memory is always the same so I assume there are no memory leaks.
It’s not much of an issue but it is VERY puzzling to me. [import]uid: 118482 topic_id: 28605 reply_id: 328605[/import]