abstract class Tinman.Core.System.ObjectPoolBase

Derived from

Disposable abstract

Extended by


Non-generic base class for ObjectPool.

Public / Methods


public method DebugIntervalTick → ()

This method must be called repeatedly in order to provide the periodic output of debug logging messages.

This method is called automatically from the following methods:

Client code should call this method only if the above calls are not sufficient for maintaining periodic debug output.

Public / Attributes


public attribute DebugInterval → (get,set)

value : int32

The debug interval, in seconds. Set to 0 to disable.

Sets the time interval to use for logging usage statistics of this object pool.

Log messages are emitted in the category Tinman.Core.System.ObjectPool using the LogVerbosity.Info message level. Each log message carries the following information:

N:00000 D:00000 G:52992 P:52814 C:00414/01024 S:00000/00000 (RenderStateSequencer_Batch)

where the individual numbers have this meaning (referring to the time interval since the last log message):

  • N: Number of newly created pool objects (the pool has underflowed).

  • D: Number of deleted pool objects (the pool has overflowed).

  • G: Number of objects taken from the pool.

  • P: Number of objects returned to the pool.

  • C: Maximum number of objects taken from the pool without returning (left), object count limit of the pool (right).

  • S: Maximum size of objects taken from the pool without returning (left), memory size limit in KB of the pool (right).

The default value is 0 (i.e. disabled).


public attribute LimitCount → (get,set)

value : int32

The maximum number limit. Set to 0 to disable it.

The maximum number of pooled objects.


public attribute LimitMemory → (get,set)

value : int32

The maximum memory limit. Set to 0 to disable it.

The maximum amount of memory to use for pooled objects (estimated).

Protected / Constructors


protected constructor ObjectPoolBase → (4)

name in : string

The name of this object pool.

maximumCount in : int32

Maximum number of pooled objects to hold. Set to 0 to disable.

maximumMemory in : int32

Maximum memory to hold with pooled objects (estimated). Set to 0 to disable.

monitor in : Monitor own

The monitor object to use or null.

Creates a new instance of ObjectPool.



public static readonly attribute Logger → (ILogger)

The logger object of this class.