I use SynEdit as replacement for TMemo to list permanent incoming data. To prevent a memory overflow I limit the number of rows like this:
Synedit1.Lines.Add('My new data...');
if SynEdit1.Lines.Count > 150 then SynEdit1.Lines.Delete(0);
This will limit the number of rows to 150, but the allocated memory is not released by the Delete command (checked with memoryManager), so at some point I get a memory overflow.
This behaviour happens since upgrading from Delphi 10.4 to Delphi 11 and SynEdit respectively (2022.03-11).