Where does the code to reload a scene go?

Im interested in resetting a scene when the user leaves it. Ive tried putting this code in a few places on a Composer page but dont see where it should go.

local currScene = composer.getSceneName( "current" ) composer.gotoScene( currScene )

I was also looking at 

composer.recycleOnSceneChange = true

But I read this will keep it in memory. Does this mean there could theoretically be dozens of the same scenes in memory, resulting in a crash?

Please read/watch:  http://coronalabs.com/blog/2013/08/20/tutorial-reloading-storyboard-scenes/

It’s for Composer’s older bother Storyboard.  The actual code will need to be adapted for Composer, but the concepts are the same.

Rob

I see, Im seeing how to put certain code outside the scene functions. Thanks.

Please read/watch:  http://coronalabs.com/blog/2013/08/20/tutorial-reloading-storyboard-scenes/

It’s for Composer’s older bother Storyboard.  The actual code will need to be adapted for Composer, but the concepts are the same.

Rob

I see, Im seeing how to put certain code outside the scene functions. Thanks.