FMX.ListView.TListView in Delphi 10.4 fails to free memory when reloading (even without bitmaps)?

41 Views Asked by At

FMX.ListView.TListView in Delphi 10.4 fails to free memory when reloading? This clear the list, but it doesn't free up memory :-(

if ListView1.Items.Count>0 then
begin
   ListView1.Items.Clear;
   {or alternatively try in loop}
   i:=ListView1.Items.Count;
   j := i-1 downto 0 do
   begin
      //(If there are no bitmaps - the memory also gets occupied)
      //ListView1.Items.AppearanceItem[j].Bitmap:=nil;
      ListView1.Items.Delete(j);
   end;
end;
0

There are 0 best solutions below