Hi all,
I remember reading somewhere in the Corona docs that for all widgets you have to manually call removeSelf() and nil out the widget var like this:
local button function scene:createScene( event ) local group = self.view button = widget.newButton( { your init params here } ) group:insert(button) end function scene:destroyScene( event ) if button then button:removeSelf() button = nil end end
But what if you scope your widget variable to inside the createScene function like this:
function scene:createScene( event ) local group = self.view local button = widget.newButton( { your init params here } ) group:insert(button) end function scene:destroyScene( event ) -- don't need to clean up the widget? end
Will the resources automatically be released now?