why dose memory usage keep increasing with even a single enterframe call?

Hi all,

I am working on a project, since I found my app will slow down after lunching for about 5 mins, I guess there is one or more memory leak in my code, I kept comment out my code to find where the leak is and end up having only 

Runtime:addEventListener("enterFrame",function ( event )     print("Engine Memory Usage: "..collectgarbage("count")) end)  

in my main.lua

After about 2 mins inspection, I made sure that corona clear the memory every a few seconds, which matches the apple’s garbage collection algorithm, however the memory used after clearance n+1 will always be a few more than memory used after clearance n, which means the app will eventually leak all the memory even it is not doing a single thing while doing things will makes it faster

For example, with only enter frame call, memory usage is like

200 -> 400 -> 210 -> 440 -> 230 -> … -> leak all the memory

if I do something, then it would be like:

1500 -> 2500 ->1700 -> 2800 -> 2000 -> … -> leak all the memory quicker

Is that a corona bug or am I doing anything incorrect? BTW, I have only run it in corona simulator, but I guess that does not matter…

Can you post more of your code.  I’m not quite following what you’re doing.

Thanks

Rob

Sorry, after further tests, I found that was my mistake. I was using 30log as my OO framework, and the framework itself leaks the memory, after I made my own OO framework, everything works perfectly.

Can you post more of your code.  I’m not quite following what you’re doing.

Thanks

Rob

Sorry, after further tests, I found that was my mistake. I was using 30log as my OO framework, and the framework itself leaks the memory, after I made my own OO framework, everything works perfectly.

Hey william.wenyan i had the same problem you did. What framework did you switch to?

Hey william.wenyan i had the same problem you did. What framework did you switch to?