In article Pine.GSO.4.30.0107111111050.11366-100000@math, Adam Naumowicz adamn@math.uwb.edu.pl writes
But I want my sources to stay BP/Delphi compatible... I still don't know what is wrong with the getmem call. Maybe I should try this example with a newer compiler as Maurice says it works fine for him. It worked fine for me with BP, Delphi and FPC, but all those handle strings in somewhat different manner than GPC. Why is new better than getmem in this example ?
This sounds related to behaviour we have seen when using pointers to strings. In our case the problem was that the capacity field wasn't being set up correctly.