Thema
:
Spring IList - Capacity sinnvoll
Einzelnen Beitrag anzeigen
freimatz
Registriert seit: 20. Mai 2010
1.496 Beiträge
Delphi 11 Alexandria
#
1
Spring IList - Capacity sinnvoll
13. Jun 2025, 13:21
Ich habe da eine IList:
markieren
Delphi-Quellcode:
Result := TPointList.Create()
as
IPointList;
for
i := 0
to
numPoints - 1
do
Result.Add(points[i]);
Macht es Sinn nach dem Create ein "Result.Capacity := numPoints" einzufügen? Vielleicht wegen Performance?
Zitat
freimatz
Öffentliches Profil ansehen
Mehr Beiträge von freimatz finden