Hi,
I am tackling with my first attempt of memory leak checking on my first app. I check it by using this function I found:
function checkMemory (event) collectgarbage("collect") local memUsage\_str = string.format( "MEMORY= %.3f KB", collectgarbage( "count" ) ) print( memUsage\_str .. " | TEXTURE= "..(system.getInfo("textureMemoryUsed")/1048576) ) end Runtime:addEventListener("tap", checkMemory)
I noticed this behavior in my two scenes:
In the first scene I have a tableview that generates rows on user input and stores rows’ data in a in-memory table.
In the other scene I have another tableview that displays rows from an sql file (which store persistently data generated in scene1).
If I jump from scene 1 to 2 without performing any in scene action I don’t see any significant increase in memory usage (if at all).
If I start adding rows to the non-persistent and/or to the persistent tableview memory usage goes up with the number of rows displayed in each.
Is this normal behavior or memory leak?
I start at an average memory usage of 500kb and if the tableviews get filled heavily it goes over 1000kb, is this too much considered that it’s a very simple utility app?
Thanks!!!