--outside scene:create() local square --scene:create() square = display.newRect( 0, 0, 150, 50 ) sceneGroup:insert(square) --scene:hide() ……… did phase print( square )a table is printed on the console
15:49:50.798 table: 0A079AF8ex: 2
--scene:create() local square = display.newRect( 0, 0, 150, 50 ) sceneGroup:insert(square) --scene:hide() elseif ( phase == "did" ) then print( square )
nil is printed on the console
I understand that all local variables created in scene create are part of this big function and gets destroyed in scene:destroy( event ), so square is a global variable without any assignment in ex: 2 but what about the other variables?
Do I need to remove all display objects references and nil all variables in scene destroy? for example local centerX, etc...
I understand the timers and transition manualy removal but what about the other locals?
It is a silly question but it has caused me doubts.