TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class SimpleObjectPool in Tinman.Core.System

A simple object pool.

sealed class SimpleObjectPool with <T> as class

Remarks

This object pool is not thread-safe and cannot be used for pooling IDisposable objects.

See also:

ObjectPool

Public / Constructors

SimpleObjectPool

Creates a new instance of ObjectPool.

public constructor SimpleObjectPool (IObjectPoolFactory<T> factory, int32 count)
params factory [not-null] The pool object factory to use.
  count [>0] Maximum number of pooled objects to hold.

Public / Methods

Clear

Clears the object pool.

public method Clear ()

Get

Fetches a pooled object.

public method Get ()
type T
returns [not-null] The pooled object.

Put

Puts the given pooled object back.

public method Put (T obj)
params obj [not-null] The pooled object to put back.