ICE - memory leak question

I was told to post this in the lime forum since the creator of lime also created ICE.

I’ve got ICE in my storyboard project, and I’m really happy with it, except that it seems to have a memory leak. I’m a noob though, so it’s possible I’m not closing the ICE stuff up properly when I’m done. So, please tell me how to close and nil out the ICE stuff. Currently, my app has about 100 scenes, and everytime I go into a scene I destroy the previous scene, but my memory creeps up 0.4k each time I go from scene to scene like this. I’ve illiminated everything that could be causing this and discovered it is definitely the ICE.

Here’s what my ice implimentation looks like in a basic stripped down fashion.

require( "ice" )  
  
local myData = ice:loadBox( "inventory" )  
myData:storeIfNew( "pencilOnTable", 1 )  
myData:save()  
  
-----  
  
local function someFunction ()  
 if myData:retrieve( "pencilOnTable" ) == 1 then  
 myData:store( "pencilOnTable", 0 )  
 myData:save()  
 -- do some stuff.  
 end  
end  
  
-----  
  
-- when I leave this scene I nil out the ice object.  
myData = nil;  

But everytime i go back to a scene with code for ice in it like this, i get an memory leak of 0.4k. Which isn’t much, but my game requires these scene transitions several thousand times before game play is complete… so it adds up after a while.

I’ve seen others on the forum with this issue, but no solutions that I could find. [import]uid: 11193 topic_id: 24258 reply_id: 324258[/import]

Sorry I couldn’t get back to you sooner, been really busy these past few weeks. I haven’t used this myself yet but many developers swear by it - http://developer.anscamobile.com/forum/2011/11/19/corona®-profiler-line-line-analysis-your-code-promo-codes-included-0 - might be able to help. [import]uid: 5833 topic_id: 24258 reply_id: 101382[/import]