I'm using Delphi 10.0 Seattle.
Suppose I have a record like this:
TmyRecord = record
a,b : string;
ar : array of string
end;
And a variable like this:
v : array of TmyRecord;
and some code like this:
SetLength(v,2);
SetLength(v[0].ar,3);
SetLength(v[1].ar,2);
SetLength(v[0].ar[0],10);
SetLength(v[0].ar[1],5);
SetLength(v[0].ar[2],7);
...
v[0].ar[0][0] := 'aaaa';
v[0].ar[0][1] := 'bbbb';
....
v[1].ar[1][0] := 'xxxx';
Will this statement:
SetLength(v,0);
free all of the occupied memory, or do I have to free it manually?