TSubstringListLinguistic.Compact Method

procedure Compact;

Gives back the memory of the rows no item uses, and the memory loads and saves keep: Capacity becomes Count rounded up to a multiple of 128, at least 128, every item kept.

Result: stored in self (calling object)

Remarks:

Delete and the other operations never give memory back; Compact is the one call that does, made once after the deleting is done. Every item keeps its index and its text, and an item that reads another item's characters still reads them; as few items as possible are moved. An Items pointer or a view of an item's characters taken before is not valid after, as after Resize. An item that reads characters no item holds any more is left as it is and dangles, as after Delete. A list already that small is left as it is.