It is necessary to remove all local references?
ex: 1
--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: 0A079AF8
ex: 2
--scene:create() local square = display.newRect( 0, 0, 150, 50 ) sceneGroup:insert(square) --scene:hide() elseif ( phase == "did" ) then print( square )
[font=‘lucida sans unicode’]
[font=‘Helvetica Neue’]
nil is printed on the console
[/font][/font]
[font=‘lucida sans unicode’]
[font=‘Helvetica Neue’]
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?
[/font][/font]
[font=‘lucida sans unicode’]
[font=‘Helvetica Neue’]
Do I need to remove all display objects references and nil all variables in scene destroy? for example local centerX, etc…
[/font][/font]
[font=‘lucida sans unicode’]
I understand the timers and transition manualy removal but what about the other locals?
[/font]
[font=‘lucida sans unicode’]
[font=‘Helvetica Neue’]
It is a silly question but it has caused me doubts.
[/font][/font]
[font=‘lucida sans unicode’]
[font=‘Helvetica Neue’]
Thanks
[/font][/font]
[font=‘lucida sans unicode’]
[font=‘Helvetica Neue’]
Dodi
[/font][/font]