composer remove a scene properly & remove variable (not an object)

OMG thank you sooooo much!! I just add a line of ‘composer.recycleOnSceneChange = true’ and it fix! how amazing :slight_smile:

btw, could I ask you another question (Great explanation and I really understand the theory :smiley: )

My overlay scene still passing touches to scene behind, even in the showOverlay function I had set ‘isModal = true’

the code :

[lua]

function closeSideBar(event)

–closeSideBar 

end

function iconListener1( event )

–code of tutorial building a sliding menu

    if ( event.phase == “moved” ) then

        local dx = math.abs(event.x - event.xStart ) 

        if ( dx > 5 ) then

            scrollView:takeFocus( event ) 

        end

– added my code

local options = {

effect = “fade”,

time = 100,

isModal = true

}

elseif ( event.phase == “ended” ) then

composer.showOverlay(“a”,options)

–original tutorial code

timer.performWithDelay( 10, function() 

scrollView:removeSelf(); scrollView = nil; end )

return true

end

return true

end

– continue with other function of other button in sidebar menu

–the sidebar menu code-from the same tutorial

[/lua]

Thanks :smiley: