Yes, multiple enemies being created and destroyed. Enemies are added to a table when created and I loop through the table in my destroy function before switching scenes. Posting some sample code from my destroy function:
local function destroy() for i = 1, #all\_timers do timer.cancel(all\_timers[i]) all\_timers[i] = nil end for i = 1, #all\_transitions do transition.cancel(all\_transitions[i]) all\_transitions[i] = nil end display.remove(cd\_box) cd\_box = nil for i = 1, #cd\_slices do --print("removing slice # " .. i) display.remove(cd\_slices[i]) cd\_slices[i] = nil end cd\_slices = {} display.remove(game\_lost\_splat) game\_lost\_splat = nil camera.detach() player:goodBye() Runtime:removeEventListener("updateLives", scene) Runtime:removeEventListener("addTime", scene) Runtime:removeEventListener("takeDamage", scene) Runtime:removeEventListener("gameWon", scene) Runtime:removeEventListener("gameLost", scene) Runtime:removeEventListener("gotGoldGrape", scene) map = {} map = nil mapData = {} mapData = nil world = {} content = {} world = nil content = nil if(ability\_rect.\_functionListeners.touch)then ability\_rect:removeEventListener("touch", abilityTouched) end if(countDownTimer ~= nil) then timer.cancel(countDownTimer) countDownTimer = nil end if(cd\_timer ~= nil) then timer.cancel(cd\_timer) cd\_timer = nil end for i = 1, #random\_enemies do for j = 1, #random\_enemies[i] do random\_enemies[i][j]:goodBye() end random\_enemies[i] = {} end random\_enemies = {} end