So I’m sitting here merrily going along and at the top of a storyboard scene file,\
I happily do:
someSound = audio.loadSound(“pathto/sound.mp3”)
and later on, I will use audio.play to play said sound.
My scene exits, and I’m when I’m heading to my next scene, I execute:
timer.performWithDelay(1000, function() storyboard.removeAll() end)
to blow away any scenes that I still have. Memory is precious and I can’t wait on low memory events to clean up these graphic heavy scenes.
I have been running on the impression that my audio assets are being disposed of when this removeAll() fires. I was also under the impression that my sprite sheets, courtesy of sprite_loq were graciously being freed up as well.
While tracking down some bizarre behavior and odd crashes, I decided to watch my memory usage in Instruments and low-and-behold I’m leaking badly. Now since I know storyboard is cleaning up my images neatly for me, and my animations are inserted into group, they should be getting cleaned up too, which leaves me with Audio and sprite Factories (from sprite_loq) hanging around.
My question, is do I need to dispose of these assets by hand or is storyboard.removeAll() doing what I think it should? These are big leaks, not the garden variety Lua memory leaks. I’m heading into the Leaks memory profiler to see if it gives me any more info.
What say ye? Am I being a n00b? Are my other storyboard apps being problematic too?
Thanks
Rob
PS. Please do not move this to the sprite_loq forum, it’s a storyboard question. You can move it to the storyboard forum, its where I tried to post it, but in the required forum drop down above, I can’t choose storyboard… [import]uid: 19626 topic_id: 30350 reply_id: 330350[/import]