Unit 'pooledmm' Package
[Overview][Types][Classes][Index] [#fcl]

TNonFreePooledMemManager

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Memory manager for fixed memory blocks which does not free any memory.

Declaration

Source position: pooledmm.pp line 80

type TNonFreePooledMemManager = class

public

  ClearOnCreate: Boolean;

  

Determines whether newly allocated memory should be cleared.

  property ItemSize: Integer; [r]

  

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;

Inheritance

TNonFreePooledMemManager

  

Memory manager for fixed memory blocks which does not free any memory.

|

TObject

Description

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.


Documentation generated on: Nov 23 2024