OS: Windows XP
IDE: Delphi2005
On saving a packed record via an buffer to tfilestream i get some noise inside the record.
TMyRecord = packed record
name: string[255];
someint: int64;
end;
PMyRecord = ^TMyRecord;
system.New(myrecord);
//fillchar(filerecord.name, 255,0);
myrecord.name := 'name';
When i leave out the fillchar part i get some random chars inside the name part of the record. Why? It even seems ot include some names i used on the form?
I even have to use fillchar on the buffer i copy the record to.
Why cannot delphi inialize memory cleanly?
Thanks for your answers in advance.
Bookmarks