Delphi:TCountedList

Internally, TCountedList uses two TIntLists. One is used to store the actual integer values whilst the other is used to store a reference count. TCountedList does not have any repeated values. Attempting to add an existing value to the list merely increments the reference count of the existing entry. Attempts to remove entries from the list result in the reference count for the entry being decremented. Actual removal only occurs if the reference count is reduced to zero.

The principal methods of TCountedList are listed below

Usage: Create an instance of TCountedList whenever you need to store a sequence of reference counted integers. Use TCountedList methods and properties to manage your entries. Remember to free the instance once you are done.
Download
Jump To...

Colophon