Memory Problems

Hi everyone.

I am building a little game with some levels, and i am using popUp (director) to change the scene to the score menu.

Simple Example.

If the bird contact with the water, it will go to the score menu, using popUp, it is really simple.

Practice example:
This code is inside of a runtime

if BirdsCollide == true then  
  
 -- Load GlobalValues  
 local GlobalValues = ice:loadBox ( "GlobalValues" )  
 local Time = GlobalValues:retrieve( "Time" )  
  
 director:openPopUp( "score" )  
  
end  

and i am using the ice library to save the time, to show inside of the score popUp, and then on the popUp i have a button to play again, and it will not restart all the level, just close the popUp and you can play again, but every time that i do it, it will increase the memory some like 0.3883 to 0.39, and will increate the same values each time that i play and go to the score and then go back to the game, will increasing every time.

I deleted the ice library to test if it is the problem, and it is a little but not the total. i used others popUps and dont have any problem, but with this part i am having some problems :frowning:

Anyone can help? [import]uid: 26056 topic_id: 23129 reply_id: 323129[/import]

Will it decrease if you leave it to go for a while? Corona doesn’t do ‘garbage collection’ straight away. It takes time.
Make sure if you are creating objects that they are removed and set to nil before re-creating them again. [import]uid: 10389 topic_id: 23129 reply_id: 92928[/import]

yeh the ice library is increasing my memory every time, i tested with ice library and without ice library and it is the problem :confused: the rest of my code works great and remove all the images etc, only the load box and retrieving variables from ice library is increasing my memory and dont stable. [import]uid: 26056 topic_id: 23129 reply_id: 92985[/import]

You might consider posting about this in the Lime sub forum - the creator of Lime is also the creator Ice, he may be able to advise you :slight_smile: [import]uid: 52491 topic_id: 23129 reply_id: 93202[/import]