I see a call to "Execute", which belongs to a TTask and is fairly long, and calls numerous subroutines. I already suspected that one of those may contain the bug, but at first glance everything seems to be fine, everything what is created is freed properly.
Thnx, Armin.
Take a second glance.
heaptrc gives you the starting point (caller) where the issue originated from.
you can be 99.99999% sure that there is an unfreed object (or pointer) somewhere there
When i start writing a program, usually i use an additional log-file, which gets written to in each constructor and destructor of every class i use
(e.g. log-entry might look like: "2022-01-27 13:31:06: Unit MyUnit1: Line 161 - TMyClass created" (or free'ed))
If heaptrc throws me a memory-leak i just have to check the logfile and count the "create"'s against the "free"'s