[fpc-devel] mising ansi string ref increase

Sergei Gorelkin sergei_gorelkin at mail.ru
Thu Jul 22 13:31:29 CEST 2010

Martin wrote:
> I saw the error in my thinking, after Jonas (re-) explained the meaning 
> of "const".
> and I guess it applies to other types to (as long as they are passed by 
> reference): e.g records are likely to see changes too...

Indeed. I was initially not completely correct, and should have said:
the 'const' modifier prevents creation of the local copy of the argument.
The exact way of creating local copy depends on the argument type: for reference-counted types, it 
is done by manipulating the refcount, other types like shortstrings use a plain copy, etc.


More information about the fpc-devel mailing list