A very simple question:
type
TMyRecord = Record
Int: Integer;
Str: String;
end;
PMyRecord = ^TMyRecord;
var
Data: PMyRecord;
begin
New(Data);
Data.Int := 42;
Data.Str := 'Test';
Dispose(Data);
end;
My question is, am I creating a memory leak here (with the String
)? Should I call Data.Str := '';
before calling Dispose
?
Thanks!
Dispose()
. – Hadrian