local localGroup = display.newGroup(); local image = display.newImage("some\_image.png"); image.x, image.y = display.contentWidth/2, display.contentHeight/2; localGroup:insert(image); timer.performWithDelay(500, function() if(image)then print("Not nil."); else print("Nil."); end end, -1); local function deleteImage(e) if(e.phase == "ended")then localGroup:removeSelf(); localGroup = nil; end end Runtime:addEventListener("touch", deleteImage);
It’s said in some tutorials that an image inserted in a certain group is deleted when I remove that group. That’s not happening in the code above…
What’s wrong?
Thanks.