I've unlimited arrow object ...
local function deleteit(obj)
display.remove(obj)
end
local function createArrow()
local arrow = display.newImageRect("images/right",64,64)
arrow.x = centerX
arrow.y = centerY
transition.to(arrow,{time = 1000, x = 0 , y = 0 , onComplete = deleteit(arrow)})
end
timer.performWithDelay(1000,createArrow,0)
But when I run this game, all of my arrow vanish. I know why they vanished but I don't know how to fix this code. Please help me.
PS. I cannot use array because of memory problems.