storyboard and memory cleaning problem

Hi everybody.

I’m developing my App using ‘storyboard’ and I’m having a problem with cleaning memory.

I need my memory completely cleaned up every time I switch to a new scene.

I know it’s a common issue but I visited the blogs, forums, looked at the samples and tried to use removeScene() and removeAll() but I was not able to achieve my purpose.

At this link are main.lua and two pages of the project:
https://dl.dropbox.com/u/10259282/nuvole_scenes.zip

Please is there anyone who can help me?

Thanks a lot

Raimondo [import]uid: 106680 topic_id: 29234 reply_id: 329234[/import]

Hi,

I had the same issue a few days ago in a really big project of mine where texture memory usage is critical and I guess I have found a solution to reset texture memory to 0 in the beginning of each scene.

In short, I use storyboard.removeAll() in the beginning of each scene:createScene event handler and also use dummy scenes to load each new scene (those which are not overlay scenes). These dummy scenes are loaded first and then they load normal scenes automatically. Like “emptygamescene” loads “gamescene”.

Besides, I found out that dummy scenes for some reason should be loaded like this storyboard.gotoScene( “emptymenuscene”, “fade”, 50 ), a short “fade” time is required for my solution to work in the current build. Then normal scenes can be loaded without “fade”.

If you need more info and if you post your email address, I will send you a modified default Corona game template with my solution and explanations. [import]uid: 152138 topic_id: 29234 reply_id: 117640[/import]