Hello everybody,
This is my very first question in the forums.
I’ve done my best to avoid leaks for an on going project I have.
I followed every suggestion on this post:
http://developer.coronalabs.com/forum/2012/05/21/guide-findingsolving-memory-leaks
But I still had a constant memory leak that I couldn’t resolve.
I started ripping down everything from my project one by one, then had the idea to try out: a simple four line main.lua file and nothing else. You can try it yourself, just build a simple main.lua file consisting of these four lines in a new folder.
function printMemory(event) print(collectgarbage('count')) end Runtime:addEventListener('enterFrame', printMemory)
And even still with this empty file, I am seeing minor increase in the memory count, it’s around 4 kilobytes a second, but the raise is constant (until the gc of course).
Is this normal? If it is, Danny from the Corona Staff says in the post from the link above, that he only has 1kb of leak for every 3-4 scene change. How could this be possible when I’m leaking 3-4kb’s a second.
A part of the output to the four line code is below, am I reading it wrong? Am I missing something?
Dec 11 22:28:08.772: 303.1953125 Dec 11 22:28:08.801: 303.41015625 Dec 11 22:28:08.835: 303.6259765625 Dec 11 22:28:08.868: 303.84375 Dec 11 22:28:08.901: 304.056640625 Dec 11 22:28:08.934: 304.2734375 Dec 11 22:28:08.967: 304.48828125 Dec 11 22:28:08.999: 304.7041015625 Dec 11 22:28:09.033: 304.921875 Dec 11 22:28:09.066: 305.1357421875 Dec 11 22:28:09.099: 305.353515625 Dec 11 22:28:09.132: 305.5703125 Dec 11 22:28:09.165: 305.78515625 Dec 11 22:28:09.197: 306.0009765625 Dec 11 22:28:09.231: 306.21875 Dec 11 22:28:09.264: 306.431640625 Dec 11 22:28:09.296: 306.6484375 Dec 11 22:28:09.329: 306.86328125 Dec 11 22:28:09.362: 307.0791015625
Thanks in advance, to anyone who takes the time to even read this.
Cheers.