Not cleaning array of images

Hi, just getting used to the director class and having a little trouble with things in arrays being cleaned at a scene change.

I run through the array and add each item to the localGroup displayGroup

local localGroup = display.newGroup()  
  
local boxes = {}  
for i = 1, 10 do  
 boxes[i] = display.newImage("brick.png", 60+(i\*30), 270)  
 physics.addBody(boxes[i], "static", {friction=0.1})  
end  
local triangle = display.newImage("triangle.png", 120,60,true)  
  
localGroup:insert(triangle)  
  
for i = 1, 10 do  
 localGroup:insert(boxes[i])  
end  

On the next scene the boxes will remain but the triangle will vanish as expected
I imagine I am doing something pretty basic wrong, any ideas?
Thanks in advance,
Matt

[import]uid: 38562 topic_id: 8398 reply_id: 308398[/import]

Ignore the above, wouldn’t let me delete it.
Ended up I had copy and pasted the boxes code when using it as a template into the next screen!

Feel like an idiot and it took me a day to notice! [import]uid: 38562 topic_id: 8398 reply_id: 30192[/import]