TNonFreePooledMemManager class
Memory manager for fixed memory blocks which does not free any memory.
Declaration
TNonFreePooledMemManager = classDescription
TNonFreePooledMemManager keeps a list of fixed-size memory blocks
in memory. Each block has the same size, making it suitable for storing a
lot of records of the same type. It does not free the items stored in it,
except when the list is cleared as a whole.
It allocates memory for the blocks in a exponential way, i.e. each time a new block of memory must be allocated, it's size is the double of the last block. The first block will contain 8 items.
Properties
ItemSize | public | Size of an item in the list. |
Methods
Clear | public | Clears the memory. |
Create | public | Creates a new instance of TNonFreePooledMemManager. |
Destroy | public | Removes the TNonFreePooledMemManager instance from memory. |
NewItem | public | Return a pointer to a new memory block. |
EnumerateItems | public | Enumerate all items in the list. |
Fields
ClearOnCreate | public | Determines whether newly allocated memory should be cleared. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
