Array of objects

I have an array of objects defined as
objects-1 () as new objects-2

after each loading of object-1 I REDIM object-1 (-1) to clear it

loading the objects-1 array a few times, I end up with with all object-1 are the same as the last loaded object-1

How can I fix that ?

Create a new object each time before you add it to the array.

// doesn't work
dim o as new object
for i = 1 to 5
   objects.append(o)
next

// does work
dim o as object
for i = 1 to 5
   o = new object
   objects.append(o)
next