[Overview][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Memory manager for fixed memory blocks which does not free any memory
Source position: pooledmm.pp line 73
type TNonFreePooledMemManager = class |
||
public |
||
ClearOnCreate: Boolean; |
|
Determines whether newly allocated memory should be cleared |
|
Size of an item in the list |
|
procedure Clear; |
|
Clears the memory |
constructor Create(); |
|
Creates a new instance of TNonFreePooledMemManager |
destructor Destroy; override; |
|
Removes the TNonFreePooledMemManager instance from memory |
function NewItem; |
|
Return a pointer to a new memory block |
procedure EnumerateItems(); |
|
Enumerate all items in the list |
end; |
|
Memory manager for fixed memory blocks which does not free any memory |
|
| | ||
TObject |
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.
lazarus-ccr.sourceforge.net |