Group Cleaning Script Updated to 1.1 When it comes to removing display objects, the best practices include:
Remove any associated event listeners from the object.
Call removeSelf() on the display object.
Set the display object’s variable to nil.
In the latest iteration of cleangroup.lua (1.1), as a “backup defense”, I added a check for any touch listeners to display objects before they are removed. You should always follow the best practices above, but the new update should help &just in case you forget to remove any touch listeners from an object before calling
You can download the updated script here (v1.1): cleangroup.lua