So when i create two different lines using the same variable and try to use display.remove, only the recently created line is removed.
I am aware that the reference to the previous line is lost. But is there a way to remove that too.
And i am also aware that i can use a hash table to create two or more lines using same variable. But what i want to know is whether any method exists to remove the previous line.
Example:-
local line
line = display.newLine(10, 20, 50, 60) – First
line = display.newLine(50, 70, 60, 40) – Second
display.remove(line)
line = nil.
Here only the second line gets removed. But now i have lost reference to the first line. So i want to know if there is a way to remove the first line.
I’m just asking to know if its possible.