Am 11.10.2017 15:28 schrieb "Ryan Joseph" <r...@thealchemistguild.com>: > > > > > On Oct 11, 2017, at 5:01 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: > > > > No, you need constref then. > > Ok, so constref/var are the same in terms of copying. The docs say const reduces stack size? I never label my parameters with const but maybe it’s worth it some cases. >
This is basically only the case for managed parameters like strings and interfaces as such don't need an implicit try...finally-block in case of const and constref to correctly reset their reference count in case of an exception Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal