[fpc-devel] Memory leak on BeginThread() when RTL compiled with -O2

NetSpirit netspirit at meta.ua
Fri May 21 09:39:23 CEST 2021


Thank you, i will try this.

> I've take a look at you RTL compile script and found the mess with the
compiler options.
>
> When compiling RTL you should disable reading of options from fpc.cfg
using the -n switch.
> When compiling the system unit use the -Us switch.
> Additionally specify only CPU/Target and optimization options -O.
> No other options are required for Windows RTL.
>
> When RTL is properly compiled, even with -O2, your test program works
without memory leaks.
>
> Yuriy Sydorov,
> jura at cp-lab.com




More information about the fpc-devel mailing list