On Wed, Mar 29, 2023 at 11:44 AM Ondrej Pokorny via fpc-devel <fpc-devel@lists.freepascal.org> wrote: > > FYI: Delphi doesn't create a memory leak. >
The memory leak seems to be related to string concatenation in the getter for the Text property. A getter like this is enough to get the leak: function TBar.GetTextStr: String; begin Result := 'X'; Result := Result + 'Y'; end; If the initial assigment to Result is an empty string, then no leak occurs. I'll report it in the bugtracker. -- Bart _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel