Reputation: 2291
procedure Test;
var
AText: array of AnsiChar;
begin
SetLength(AText, 7);
end;
What is the real size of AText occupied in memory? Is it 7 + Cardinal size of its length, that is, 7 + 4 = 11 bytes?
Upvotes: 5
Views: 558
Reputation: 26356
That plus 4 bytes reference count. And of course heapmanager overhead (which depends on delphi version and uses memory manager, which can easily be 12-16 bytes).
So that means:
Upvotes: 5