So can I do this?
[lua]explosion:setSequence( “explosion” )
explosion:play()
local function ExplotionListener(event)
if (event.phase == “ended”) then
explosion:removeEventListener( “sprite”, ExplotionListener )
display.remove(explosion)
explosion = nil
ExplotionListener = nil
end
end
explosion:addEventListener( “sprite”, ExplotionListener )[/lua]
I could use timer to do this, but I want to avoid timers as much as possible 
No errors occur, but I am just wondering if this is horrible coding 
EDIT: I just put [lua]print(explotion)[/lua] in ExplotionListener and [lua]print(ExplotionListener)[/lua] in timer when it should be nil and it prints nil alright, but it prints it like 10 times… so this is a bad way to do this… so timers then?
The big idea is that I make objects use the same explosion animation when I destroy them. And I want to be sure there won’t be memoryleaks.