I need to store a temporary list of records and was thinking that a TList
would be a good way to do this? However I am unsure how to do this with a TList<
Use Generiс TList from System.Generics.Collections. If you need to access to a record in generic TList by-reference and do not copy record: use List.List - direct access to the array of TList.
MyList := TList.Create;
[...]
var lRecP: PTestRec; // (PTestRec = ^TTestRec)
lRecP := @MyList.List[i];
Now you can access to record inside Tlist array without copying it.