by doing, array[1..1000000], you will take a lot of memory space at the declaration.
as you won't use all of them, i suggest you to define the array dynamically,
m: array of StaffMemo;
maintain a global counter: nbsm: Integer;
and each time you want to add lines into it:
Inc(nbsm);
setLength(sm, nbsm);