Rx Object List

RX Library

Control Name Unit Class
Huge List. ObjStr THugeList

Description:
Class THugeList is 16-bit class similar to TList, but the indexes are of type LongInt, rather than Integer. The size of the list is limited only by the amount of virtual memory that can be allocated from Windows. Each item is a Pointer. THugeList never dereferences this pointer, and it can be any value you want it to be. When items are deleted from the list and when the list is destroyed, these items are not freed or dereferenced.

If you know that your indexes will be smaller than 16K, then use TList, not THugeList, to obtain better performance. Note that THugeList is not fully optimized for performance.

NOTE. In 32-bit version the THugeList class is a stub and declared as THugeList = TList;


Class TObjectStrings
Class TObjectStrings is similar to TStringList, but TStringList never dereferences the pointer, stored in the list as Objects property.

Unlike the TStrings and TStringList, when items are deleted from the TObjectStrings list and when the list is destroyed, these items are freed and dereferenced. By default, the DestroyObject virtual method calls the OnDestroyObject event handler, which calls TObject.Free to free and dereference the object.

You can change this behavior by specifying what processing you want to occur in the OnDestroyObject event handler.


Event OnDestroyObject
Declaration: OnDestroyObject: TDestroyEvent;

The OnDestroyObject event occurs when a object stored in the list are freed. By default, the DestroyObject method calls the OnDestroyObject event handler, which calls TObject.Free to free and dereference the object. You can change this behavior by specifying what processing you want to occur in the OnDestroyObject event handler.


Method Remove
Declaration: procedure Remove(Index: Integer);

Removes the item given by Index from the list. Remove does not destroy of item. If you need to delete and destroy of an item, call Delete method.


Const MaxHugeListSize
Declaration: MaxHugeListSize = MaxLongint div SizeOf(Pointer);;

The MaxHugeListSize constant represents the largest number of items a THugeList object can contain.


Type TDestroyEvent
Declaration: TDestroyEvent = procedure(Sender, AObject: TObject) of object;

TDestroyEvent is the type of the OnDestroyObject event of the TObjectStrings class.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000