Hans-Peter Diettrich пишет:
Marco van de Voort schrieb:

PChars, on the other hand, require manual memory management
which is the source of bugs.

Point out the example of bugs. (ones that matter, not the stylistic ones)

The usage of PString essentially is using an crippled AnsiString, without reference counting. I did not yet find any (obvious) bugs, but several flaws where ShortStrings are allocated, copied and disposed for no reason. See pmodules.try_consume_hintdirective.

In pmodules.try_consume_hintdirective, copying happens exactly once; if you 
write
something like "type foo=class end deprecated 'a' deprecated 'b';" it will end 
up
with IE200910181. That deserves a fix with a more user-friendly error message, 
but the logic is correct.

Regards,
Sergei
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to