Is it possible to remove or clear items from TFPSList without actually 
shrinking the memory (i.e. setting capacity to 0)? Looking the source below I 
see every time I clear the list it the capacity is set to 0 also. This is fine 
most of the time unless you want to reuse the list without reallocating memory.

If it’s not possible can I make a patch to include this option?

procedure TFPSList.Clear;
begin
  if Assigned(FList) then
  begin
    SetCount(0);
    SetCapacity(0);
  end;
end;


Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to