On Wed, Mar 29, 2023 at 11:43 PM Bart <bartjunk64 at gmail.com> wrote: > I'll report it in the bugtracker. https://gitlab.com/freepascal.org/fpc/source/-/issues/40225 I condensed the program even further. Just concatenating 2 strings in Foo and assigning them to S will be enough to trigger the memory leak. -- Bart