Arrays (dynamic) and strings (ansi/long) do work in objects, just like they do in records.
But your problem is
Move(
FTimerRecs[sgTimers.Selection.Top - 1],
FTimerRecs[sgTimers.Selection.Top],
(sgTimers.Selection.Bottom - sgTimers.Selection.Top + 1) * SizeOf(TTimerRec));
Move does not work with managed data. It does not matter if you do
move (MyString, MyOtherString, sizeof(pointer))
Or if the string/array is in a record/object and you move that.
You
- throw away the internal pointer of the string/array on the target object => but you do not decrease the refcount
- duplicate the internal pointer of the string/array of the source => but you do not increase the ref count
So, if the string/array was NOT empty, then you
- leaked one string/array
- corrupted another (which may later cause a crash, if unlucky)
If you do the above with classes, and have an array of TMyObject, then you copy the pointer to TMyObjcet, and that is not refcounted. The data in the instance would not be moved, and strings/arrays would not be corrupted.