Genau so ein Testprojekt hatte ich auch grade einbringen wollen, aber der rote Kasten war schneller. Dann halt nur noch das Zitat auzs dem DocWiki:
Zitat
aus dem DocWiki:
Zitat:
Unlike strings and static arrays, copy-on-write is not employed for dynamic arrays, so they are not automatically copied before they are written to. For example, after this code executes:
Delphi-Quellcode:
var
A, B: array of Integer;
begin
SetLength(A, 1);
A[0] := 1;
B := A;
B[0] := 2;
end;
the value of A[0] is 2. (
If A and B were static arrays, A[0] would still be 1.)