On 2023-04-04 16:14, Bart via fpc-pascal wrote:
On Tue, Apr 4, 2023 at 9:43 AM Jacob Kroon via fpc-pascal
<fpc-pascal@lists.freepascal.org> wrote:

What is the technical downside to using "const", or is it just cosmetic ?

If your local "writeable constant" is of type string, and strings are
longstrings, and the writeable const is assigned a value that is the
result of a string concatenation, then you'll have a memory leak.

Well, managed types are not very likely in code imported from a Pascal compiler not knowing units...

Tomas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to