This is why you should always test your Delphi apps with FastMM4 and FullDebugMode
enabled: [WayBack] Delphi – Recompiling application with 10.2.1 causes memory leaks?
A workaround is to add the below code in either of these places:
- end of your
.dpr
file right before theend.
- in the
finalization
section of a new unit
CheckSynchronize
();
It calls the [WayBack] System.Classes.CheckSynchronize
method to ensure the background thread performs the needed cleanup.
Thanks Stefan Glienke for solving this.
–jeroen