Class ObjectPool< T >

Public

Lightweight object Pool for IAstarPooledObject.

Handy class for pooling objects of type T which implements the IAstarPooledObject interface.

Usage:

  • Claim a new object using SomeClass foo = ObjectPool<SomeClass>.Claim ();

  • Use it and do stuff with it

  • Release it with ObjectPool<SomeClass>.Release (foo);

After you have released a object, you should never use it again.

Since

Version 3.2

Version

Since 3.7.6 this class is thread safe

See

Pathfinding.Util.ListPool

ObjectPoolSimple

Public Static Methods

Claim ()
Public Static
Release (obj)
Public Static