You need to initialize the new structure with zeros. GetMem does not reset the allocated memory, so the fields in your record initially contain random garbage. You need to call
FillChar(newItem^, sizeof(TAccessoryItem), 0)
after GetMem before using the entry.
: , , RTL , ( ) , . , , , .
- , ... . , , . , AV , , , , , , .
, , , , , , , , .
Delphi - New():
New(newItem);
(sizeof, ), .
Dispose():
Dispose(newItem);
, , , , , .
FreeMem (newItem), , , , , .
, , ( "String", "string [10]" ), , , , , -, .
: GetMem/FreeMem . , . New Dispose "" , , , , .
, GetMem/FreeMem, , .