Re: [fpc-pascal] AnsiString address changed

2024-03-17 Thread Michael Van Canneyt via fpc-pascal
On Mon, 18 Mar 2024, Hairy Pixels via fpc-pascal wrote: Curious, why did the address of "s" change here? Shouldn't the AnsiString be incrementing a reference count and not actually changing the actual pointer or copying? Correct me if I'm wrong, AnsiString is ref counted when passing in/ou

[fpc-pascal] AnsiString address changed

2024-03-17 Thread Hairy Pixels via fpc-pascal
Curious, why did the address of "s" change here? Shouldn't the AnsiString be incrementing a reference count and not actually changing the actual pointer or copying? Correct me if I'm wrong, AnsiString is ref counted when passing in/out functions but copies on assignment so technically no two A