Bug after 10 switch between 2 scenes ...

Hi,

I try to make kind of RPG game so i use Lime to make the world. i have make some collision detection to change scene but more i switch scene more the game lag and finish to crash …

I think scene stay in background so can we kill scene before start the next ?

Here is where i call the director changing scene …

local function onCollision(self, event )  
  
 if ( event.phase == "began" ) then  
 if event.other.IsDoor then  
 print "Porte ..."  
physics.stop()  
director:changeScene( "03", "crossfade" )  
  
 end  
 elseif ( event.phase == "ended" ) then  
 if event.other.IsDoor then  
 print "pas de Porte ..."  
 end  
 end  
end  

somebody can help me :slight_smile: ? [import]uid: 73995 topic_id: 12648 reply_id: 312648[/import]

Have you tested your program for memory leaks?

I had a problem like this and I found the following info useful:

http://developer.anscamobile.com/code/texture-memory-monitor
[import]uid: 17085 topic_id: 12648 reply_id: 46296[/import]

Thx for your help.

i have use map:destroy() and thats fix the lag probleme.

work well in simulator but not on device :frowning: [import]uid: 73995 topic_id: 12648 reply_id: 46380[/import]