Ryan Joseph <r...@thealchemistguild.com> schrieb am Fr., 25. Mai 2018,
12:45:

>
>
> > On May 25, 2018, at 3:57 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > If I had to guess you were probably doing something with the arrays they
> weren't designed for. :/
> >
>
> It’s a little foggy now but I think I had a dynamic array in a class which
> was being passed around some functions or the class (with the dynamic
> array) was in a record which was being passed around some functions. I
> think this was happening within tight loops also.
>
> Bottom line is if the that thread lock function does anything expensive
> then passing around dynamic arrays within tight loops could be a deal
> breaker unless you could manually declare a dynamic array as not thread
> safe.
>

When passing around dynamic arrays in such situations var and constref
parameters should be used and assignments inside those loops should be
avoided.

Regards,
Sven

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

Reply via email to