Delphi - structures' strings not being freed [FastMM manager]
问题 If I declare PSomeStruct = ^TSomeStruct; TSomeStruct = record s1 : string; end; and I run the following code: var p: PSomeStruct; begin new(p); p^.s1:= 'something bla bla bla'; dispose(p); the FastMM 4 memory manager reports that there was a memory leak (type: string, data dump: "something bla bla bla"). However, if I do set the s1 string to empty before calling dispose it's OK. The second way I found is to change from record type to class, then instead of new I'm creating the instance, and