Apologies if this is not the correct place to ask this, but I’ve been wondering about this for a while now.
I’m using Director to change between scenes, and I was wondering if it is needed to remove eventlisteners before I change scene?
For example, I have code that would send me back to the main menu, do I write it like this (example):
local returnToMainMenu() mainMenuBtn:removeEventListener ( "touch", returnToMainMenu ) someButton:removeEventListener( "touch", someFunction ) HUD:removeSelf() -- A group game:removeSelf() -- Another group director:changeScene( "mainMenu", "fade" ) end
Or is this all unnecessary? Are listeners removed if the group the elements are in is removed?